diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-09-18 21:50:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 21:50:44 (GMT) |
commit | 88c60c9668f0aa732693517a60b851cc1dfce0cb (patch) | |
tree | 60a30eb883118025b6416f566e64598dac8b8a58 /Lib/importlib/_bootstrap_external.py | |
parent | b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd (diff) | |
download | cpython-88c60c9668f0aa732693517a60b851cc1dfce0cb.zip cpython-88c60c9668f0aa732693517a60b851cc1dfce0cb.tar.gz cpython-88c60c9668f0aa732693517a60b851cc1dfce0cb.tar.bz2 |
Trivial cleanups following bpo-31370 (#3649)
* Trivial cleanups following bpo-31370
* Also cleanup the "importlib._bootstrap_external" module
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 3235404..e9f870b 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -1411,11 +1411,7 @@ def _setup(_bootstrap_module): setattr(self_module, 'path_separators', ''.join(path_separators)) # Directly load the _thread module (needed during bootstrap). - try: - thread_module = _bootstrap._builtin_from_name('_thread') - except ImportError: - # Python was built without threads - thread_module = None + thread_module = _bootstrap._builtin_from_name('_thread') setattr(self_module, '_thread', thread_module) # Directly load the _weakref module (needed during bootstrap). |