summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 0393ba5..d322d8f 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -50,12 +50,9 @@ except (ImportError, AttributeError):
try:
import thread as _thread
- _allocate_lock = _thread.allocate_lock
-except (ImportError, AttributeError):
- class _allocate_lock:
- def acquire(self):
- pass
- release = acquire
+except ImportError:
+ import dummy_thread as _thread
+_allocate_lock = _thread.allocate_lock
_text_openflags = _os.O_RDWR | _os.O_CREAT | _os.O_EXCL
if hasattr(_os, 'O_NOINHERIT'):