summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2008-07-09 15:51:03 +0000
committerfuzzyray <fuzzyray@gentoo.org>2008-07-09 15:51:03 +0000
commitcd73020f2445b3b13a6ae33e754191600252e477 (patch)
treef046a1b3c7a1956a36a13b131788e094497b1cb8 /trunk/src
parent4bb65f17f6ca409104a54e78ff7505e8b5bf35cd (diff)
downloadgentoolkit-cd73020f2445b3b13a6ae33e754191600252e477.tar.gz
Fix gentoolkit to work without thread support in python. (Bug 223255)
svn path=/; revision=491
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