r349009 - Portable Python script across Python version
Serge Guelton via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 12 23:44:19 PST 2018
Author: serge_sans_paille
Date: Wed Dec 12 23:44:19 2018
New Revision: 349009
URL: http://llvm.org/viewvc/llvm-project?rev=349009&view=rev
Log:
Portable Python script across Python version
Queue module as been renamed into queue in Python3
Differential Revision: https://reviews.llvm.org/D55202
Modified:
cfe/trunk/utils/analyzer/SATestBuild.py
Modified: cfe/trunk/utils/analyzer/SATestBuild.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/SATestBuild.py?rev=349009&r1=349008&r2=349009&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/SATestBuild.py (original)
+++ cfe/trunk/utils/analyzer/SATestBuild.py Wed Dec 12 23:44:19 2018
@@ -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, ProjectsT
:return: whether tests have passed.
"""
- TasksQueue = Queue.Queue()
+ TasksQueue = queue.Queue()
for ProjArgs in ProjectsToTest:
TasksQueue.put(ProjArgs)
More information about the cfe-commits
mailing list