[PATCH] D55202: Python 2/3 compat - Queue

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 12 23:47:28 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC349009: Portable Python script across Python version (authored by serge_sans_paille, committed by ).
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55202/new/

https://reviews.llvm.org/D55202

Files:
  utils/analyzer/SATestBuild.py


Index: utils/analyzer/SATestBuild.py
===================================================================
--- utils/analyzer/SATestBuild.py
+++ utils/analyzer/SATestBuild.py
@@ -58,7 +58,10 @@
 import sys
 import threading
 import time
-import Queue
+try:
+    import queue
+except ImportError:
+    import Queue as queue
 
 ###############################################################################
 # Helper functions.
@@ -742,7 +745,7 @@
 
     :return: whether tests have passed.
     """
-    TasksQueue = Queue.Queue()
+    TasksQueue = queue.Queue()
 
     for ProjArgs in ProjectsToTest:
         TasksQueue.put(ProjArgs)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55202.178008.patch
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181213/a13a1be5/attachment.bin>


More information about the cfe-commits mailing list