Skip to content

Commit 36c7cde

Browse files
authored
Rollup merge of rust-lang#57453 - cuviper:python3-thread, r=nikomatsakis
lldb_batchmode.py: try `import _thread` for Python 3 None
2 parents 8e3980b + d9ddc39 commit 36c7cde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/etc/lldb_batchmode.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@
1818
import os
1919
import sys
2020
import threading
21-
import thread
2221
import re
2322
import time
2423

24+
try:
25+
import thread
26+
except ModuleNotFoundError:
27+
# The `thread` module was renamed to `_thread` in Python 3.
28+
import _thread as thread
29+
2530
# Set this to True for additional output
2631
DEBUG_OUTPUT = False
2732

0 commit comments

Comments
 (0)