From: Josh Stone Date: Tue, 8 Jan 2019 21:19:50 +0000 (-0800) Subject: lldb_batchmode.py: try `import _thread` for Python 3 X-Git-Tag: archive/raspbian/1.32.0+dfsg1-1+rpi1^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dd312f8eea711b1da998c9467c1e51de9f46b2cb;p=rustc.git lldb_batchmode.py: try `import _thread` for Python 3 Gbp-Pq: Name u-0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch --- 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