From: Serge Guelton Date: Mon, 25 Mar 2019 15:14:56 +0000 (+0000) Subject: Python 2/3 compat: queue vs Queue X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b833c6af5911ca71c555771097a03643660c1643;p=platform%2Fupstream%2Fllvm.git Python 2/3 compat: queue vs Queue Differential Revision: https://reviews.llvm.org/D59590 llvm-svn: 356906 --- diff --git a/lldb/utils/lui/lui.py b/lldb/utils/lui/lui.py index 4f72b43..98e1c63 100755 --- a/lldb/utils/lui/lui.py +++ b/lldb/utils/lui/lui.py @@ -18,7 +18,10 @@ import os import signal import sys -import Queue +try: + import queue +except ImportError: + import Queue as queue import debuggerdriver import cui @@ -126,7 +129,7 @@ def main(screen): signal.signal(signal.SIGINT, sigint_handler) global event_queue - event_queue = Queue.Queue() + event_queue = queue.Queue() global debugger debugger = lldb.SBDebugger.Create() diff --git a/lldb/utils/lui/sandbox.py b/lldb/utils/lui/sandbox.py index 025554d..8bb4e35 100755 --- a/lldb/utils/lui/sandbox.py +++ b/lldb/utils/lui/sandbox.py @@ -14,7 +14,10 @@ import os import signal import sys -import Queue +try: + import queue +except ImportError: + import Queue as queue import cui @@ -62,7 +65,7 @@ class SandboxUI(cui.CursesUI): def main(screen): global event_queue - event_queue = Queue.Queue() + event_queue = queue.Queue() sandbox = SandboxUI(screen, event_queue) sandbox.eventLoop()