summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src')
-rw-r--r--trunk/src/gentoolkit/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/trunk/src/gentoolkit/__init__.py b/trunk/src/gentoolkit/__init__.py
index 668da0d..28b56be 100644
--- a/trunk/src/gentoolkit/__init__.py
+++ b/trunk/src/gentoolkit/__init__.py
@@ -25,7 +25,16 @@ except ImportError:
sys.path.insert(0, "/usr/lib/portage/pym")
import portage
import re
-from threading import Lock
+try:
+ from threading import Lock
+except ImportError:
+ # If we don't have thread support, we don't need to worry about
+ # locking the global settings object. So we define a "null" Lock.
+ class Lock:
+ def acquire(self):
+ pass
+ def release(self):
+ pass
try:
import portage.exception as portage_exception