summaryrefslogtreecommitdiff
path: root/Lib/importlib/__init__.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-07-04 14:03:40 -0400
committerBrett Cannon <brett@python.org>2012-07-04 14:03:40 -0400
commit53089c6e91f6152bc43776587e82a0bbeb574fe0 (patch)
treea5052b92b84272ad1e79f68bdb4234e563defe9b /Lib/importlib/__init__.py
parent3bee1f1154218b6bdadfe4095ef4b52c3471df01 (diff)
downloadcpython-git-53089c6e91f6152bc43776587e82a0bbeb574fe0.tar.gz
Issue #15210: Greatly simplify the test for supporting importlib
working without _frozen_importlib by moving to an import over a direct access in sys.modules.
Diffstat (limited to 'Lib/importlib/__init__.py')
-rw-r--r--Lib/importlib/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py
index dad0833fce..0935ada288 100644
--- a/Lib/importlib/__init__.py
+++ b/Lib/importlib/__init__.py
@@ -6,8 +6,8 @@ import imp
import sys
try:
- _bootstrap = sys.modules['_frozen_importlib']
-except KeyError:
+ import _frozen_importlib as _bootstrap
+except ImportError:
from . import _bootstrap
_bootstrap._setup(sys, imp)
else: