summaryrefslogtreecommitdiffstats
path: root/runtest.py
diff options
context:
space:
mode:
authorStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:13:02 (GMT)
committerStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:13:02 (GMT)
commit1a1a11122ad28df19d305af879ba79a2b08ce7d4 (patch)
tree4464eb544fe0cc698ea4d1c5789e19770b83cd6f /runtest.py
parent9f36c5b899b8d2d54cae8d3da76b01308c144ed6 (diff)
downloadSCons-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-xruntest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtest.py b/runtest.py
index 65d7851..0fad655 100755
--- a/runtest.py
+++ b/runtest.py
@@ -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)