From 15ad84e7cd33f33d287c63d6e00a221d859cce3b Mon Sep 17 00:00:00 2001 From: Stefan Zimmermann Date: Mon, 31 Mar 2014 15:13:02 +0000 Subject: Made former 2to3 changes Python 2.7 compatible (or removed unneeded changes). --- runtest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runtest.py') diff --git a/runtest.py b/runtest.py index 65d7851b..0fad6554 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) -- cgit v1.2.1