summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorgengjiawen <technicalcute@gmail.com>2019-01-25 22:20:56 +0800
committerAnna Henningsen <anna@addaleax.net>2019-01-29 00:21:01 +0100
commit08100bf632bd8a66442542abc64c693878a1d6a6 (patch)
tree26bbb534fdc266f46a810c70e9f45dc68eb58bdd /tools
parentdc843f56520292e67f1f815821f4aa27a11c67b7 (diff)
downloadandroid-node-v8-08100bf632bd8a66442542abc64c693878a1d6a6.tar.gz
android-node-v8-08100bf632bd8a66442542abc64c693878a1d6a6.tar.bz2
android-node-v8-08100bf632bd8a66442542abc64c693878a1d6a6.zip
tools: make test.py Queue part Python 3 compatible
Signed-off-by: gengjiawen <technicalcute@gmail.com> PR-URL: https://github.com/nodejs/node/pull/25701 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/test.py b/tools/test.py
index 633c347e74..56b1c8d650 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -47,7 +47,10 @@ import copy
from os.path import join, dirname, abspath, basename, isdir, exists
from datetime import datetime
-from Queue import Queue, Empty
+try:
+ from queue import Queue, Empty # Python 3
+except ImportError:
+ from Queue import Queue, Empty # Python 2
try:
cmp # Python 2