[Python-checkins] r80553 - python/trunk/Lib/test/regrtest.py

victor.stinner python-checkins at python.org
Tue Apr 27 23:47:01 CEST 2010


Author: victor.stinner
Date: Tue Apr 27 23:47:01 2010
New Revision: 80553

Log:
Issue #7449, part 2: regrtest.py -j option requires thread support

Modified:
   python/trunk/Lib/test/regrtest.py

Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py	(original)
+++ python/trunk/Lib/test/regrtest.py	Tue Apr 27 23:47:01 2010
@@ -478,7 +478,11 @@
         tests = iter(selected)
 
     if use_mp:
-        from threading import Thread
+        try:
+            from threading import Thread
+        except ImportError:
+            print "Multiprocess option requires thread support"
+            sys.exit(2)
         from Queue import Queue
         from subprocess import Popen, PIPE
         debug_output_pat = re.compile(r"\[\d+ refs\]$")


More information about the Python-checkins mailing list