[Lldb-commits] [lldb] r356906 - Python 2/3 compat: queue vs Queue
Serge Guelton via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 25 08:14:57 PDT 2019
Author: serge_sans_paille
Date: Mon Mar 25 08:14:56 2019
New Revision: 356906
URL: http://llvm.org/viewvc/llvm-project?rev=356906&view=rev
Log:
Python 2/3 compat: queue vs Queue
Differential Revision: https://reviews.llvm.org/D59590
Modified:
lldb/trunk/utils/lui/lui.py
lldb/trunk/utils/lui/sandbox.py
Modified: lldb/trunk/utils/lui/lui.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/utils/lui/lui.py?rev=356906&r1=356905&r2=356906&view=diff
==============================================================================
--- lldb/trunk/utils/lui/lui.py (original)
+++ lldb/trunk/utils/lui/lui.py Mon Mar 25 08:14:56 2019
@@ -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()
Modified: lldb/trunk/utils/lui/sandbox.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/utils/lui/sandbox.py?rev=356906&r1=356905&r2=356906&view=diff
==============================================================================
--- lldb/trunk/utils/lui/sandbox.py (original)
+++ lldb/trunk/utils/lui/sandbox.py Mon Mar 25 08:14:56 2019
@@ -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()
More information about the lldb-commits
mailing list