From: Serge Guelton Date: Thu, 13 Dec 2018 07:44:19 +0000 (+0000) Subject: Portable Python script across Python version X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1af51bd1f394d55043820805e0c4877a31e3b14e;p=clang Portable Python script across Python version Queue module as been renamed into queue in Python3 Differential Revision: https://reviews.llvm.org/D55202 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349009 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py index 95dd69d6be..ef0ab195f1 100755 --- a/utils/analyzer/SATestBuild.py +++ b/utils/analyzer/SATestBuild.py @@ -58,7 +58,10 @@ import shutil import sys import threading import time -import Queue +try: + import queue +except ImportError: + import Queue as queue ############################################################################### # Helper functions. @@ -742,7 +745,7 @@ def multiThreadedTestAll(Args, ProjectsToTest, Jobs): :return: whether tests have passed. """ - TasksQueue = Queue.Queue() + TasksQueue = queue.Queue() for ProjArgs in ProjectsToTest: TasksQueue.put(ProjArgs)