projects
/
rustc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e9711b
)
lldb_batchmode.py: try `import _thread` for Python 3
author
Josh Stone
<jistone@redhat.com>
Tue, 8 Jan 2019 21:19:50 +0000
(13:19 -0800)
committer
Ximin Luo
<infinity0@debian.org>
Mon, 28 Jan 2019 06:02:48 +0000
(06:02 +0000)
Gbp-Pq: Name u-0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch
src/etc/lldb_batchmode.py
patch
|
blob
|
history
diff --git
a/src/etc/lldb_batchmode.py
b/src/etc/lldb_batchmode.py
index b0220c84ef2fa78216a1e20a967c993003789bda..6def5ea526891ff755396749614ba83525d73af0 100644
(file)
--- a/
src/etc/lldb_batchmode.py
+++ b/
src/etc/lldb_batchmode.py
@@
-28,10
+28,15
@@
import lldb
import os
import sys
import threading
-import thread
import re
import time
+try:
+ import thread
+except ModuleNotFoundError:
+ # The `thread` module was renamed to `_thread` in Python 3.
+ import _thread as thread
+
# Set this to True for additional output
DEBUG_OUTPUT = False