Skip to content

Commit d9ddc39

Browse files
committed
lldb_batchmode.py: try import _thread for Python 3
1 parent 2cb7cdc commit d9ddc39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/etc/lldb_batchmode.py

Lines changed: 6 additions & 1 deletion
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)