Skip to content

Commit 1f88dc5

Browse files
committedDec 13, 2018
Portable Python script across Python version
Queue module as been renamed into queue in Python3 Differential Revision: https://reviews.llvm.org/D55202 llvm-svn: 349009
1 parent b3835de commit 1f88dc5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎clang/utils/analyzer/SATestBuild.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@
5858
import sys
5959
import threading
6060
import time
61-
import Queue
61+
try:
62+
import queue
63+
except ImportError:
64+
import Queue as queue
6265

6366
###############################################################################
6467
# Helper functions.
@@ -742,7 +745,7 @@ def multiThreadedTestAll(Args, ProjectsToTest, Jobs):
742745
743746
:return: whether tests have passed.
744747
"""
745-
TasksQueue = Queue.Queue()
748+
TasksQueue = queue.Queue()
746749

747750
for ProjArgs in ProjectsToTest:
748751
TasksQueue.put(ProjArgs)

0 commit comments

Comments
 (0)
Please sign in to comment.