diff options
author | Stefan Zimmermann <zimmermann.code@gmail.com> | 2014-03-31 15:13:02 +0000 |
---|---|---|
committer | Stefan Zimmermann <zimmermann.code@gmail.com> | 2014-03-31 15:13:02 +0000 |
commit | 15ad84e7cd33f33d287c63d6e00a221d859cce3b (patch) | |
tree | 4464eb544fe0cc698ea4d1c5789e19770b83cd6f /runtest.py | |
parent | 9d3a9c2cc0187294500ea8018a7ffcc1c7b67037 (diff) | |
download | scons-15ad84e7cd33f33d287c63d6e00a221d859cce3b.tar.gz |
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) |