diff options
author | Stefan Zimmermann <zimmermann.code@gmail.com> | 2014-03-31 15:13:02 (GMT) |
---|---|---|
committer | Stefan Zimmermann <zimmermann.code@gmail.com> | 2014-03-31 15:13:02 (GMT) |
commit | 1a1a11122ad28df19d305af879ba79a2b08ce7d4 (patch) | |
tree | 4464eb544fe0cc698ea4d1c5789e19770b83cd6f /runtest.py | |
parent | 9f36c5b899b8d2d54cae8d3da76b01308c144ed6 (diff) | |
download | SCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.zip SCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.tar.gz SCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.tar.bz2 |
Made former 2to3 changes Python 2.7 compatible (or removed unneeded changes).
Diffstat (limited to 'runtest.py')
-rwxr-xr-x | runtest.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -81,6 +81,7 @@ # library directory. If we ever resurrect that as the default, then # you can find the appropriate code in the 0.04 version of this script, # rather than reinventing that wheel.) +from __future__ import print_function import getopt import glob @@ -92,7 +93,10 @@ import time try: import threading - import queue # 2to3: rename to queue + try: + from queue import Queue + except ImportError: # Python < 3 + from Queue import Queue threading_ok = True except ImportError: print("Can't import threading or queue") @@ -865,7 +869,7 @@ class RunTest(threading.Thread): if jobs > 1 and threading_ok: print("Running tests using %d jobs"%jobs) # Start worker threads - queue = queue.Queue() + queue = Queue() io_lock = threading.Lock() for i in range(1, jobs): t = RunTest(queue, io_lock) |