From dd312f8eea711b1da998c9467c1e51de9f46b2cb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 8 Jan 2019 13:19:50 -0800 Subject: [PATCH] lldb_batchmode.py: try `import _thread` for Python 3 Gbp-Pq: Name u-0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch --- src/etc/lldb_batchmode.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py index b0220c84ef..6def5ea526 100644 --- 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 -- 2.30.2