about summary refs log tree commit diff
path: root/src/etc/test-float-parse/runtests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/test-float-parse/runtests.py')
-rw-r--r--src/etc/test-float-parse/runtests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/etc/test-float-parse/runtests.py b/src/etc/test-float-parse/runtests.py
index bc141877b37..d520c9bd5c3 100644
--- a/src/etc/test-float-parse/runtests.py
+++ b/src/etc/test-float-parse/runtests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/env python2.7
 #
 # Copyright 2015 The Rust Project Developers. See the COPYRIGHT
 # file at the top-level directory of this distribution and at
@@ -97,11 +97,15 @@ from collections import namedtuple
 from subprocess import Popen, check_call, PIPE
 from glob import glob
 import multiprocessing
-import Queue
 import threading
 import ctypes
 import binascii
 
+try:  # Python 3
+    import queue as Queue
+except ImportError:  # Python 2
+    import Queue
+
 NUM_WORKERS = 2
 UPDATE_EVERY_N = 50000
 INF = namedtuple('INF', '')()