diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-13 05:26:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-13 05:26:48 +0100 |
| commit | 36c7cde9e080af5b5bc4b0591f39f7f44c3e04de (patch) | |
| tree | df77c323cad356409976bf7a9306ff7fa36a0d2f | |
| parent | 8e3980b8e8e77bda49856f26255028794b05a43e (diff) | |
| parent | d9ddc39052c91568936427e3dee087b608140cf4 (diff) | |
| download | rust-36c7cde9e080af5b5bc4b0591f39f7f44c3e04de.tar.gz rust-36c7cde9e080af5b5bc4b0591f39f7f44c3e04de.zip | |
Rollup merge of #57453 - cuviper:python3-thread, r=nikomatsakis
lldb_batchmode.py: try `import _thread` for Python 3 None
| -rw-r--r-- | src/etc/lldb_batchmode.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py index 6b4c4480674..537b419b327 100644 --- a/src/etc/lldb_batchmode.py +++ b/src/etc/lldb_batchmode.py @@ -18,10 +18,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 |
