From 1af51bd1f394d55043820805e0c4877a31e3b14e Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Thu, 13 Dec 2018 07:44:19 +0000 Subject: [PATCH] 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 --- utils/analyzer/SATestBuild.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) -- 2.40.0