From b833c6af5911ca71c555771097a03643660c1643 Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Mon, 25 Mar 2019 15:14:56 +0000 Subject: [PATCH] Python 2/3 compat: queue vs Queue Differential Revision: https://reviews.llvm.org/D59590 llvm-svn: 356906 --- lldb/utils/lui/lui.py | 7 +++++-- lldb/utils/lui/sandbox.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) 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() -- 2.7.4