diff options
author | Brett Cannon <brett@python.org> | 2012-07-04 14:03:40 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-07-04 14:03:40 -0400 |
commit | 53089c6e91f6152bc43776587e82a0bbeb574fe0 (patch) | |
tree | a5052b92b84272ad1e79f68bdb4234e563defe9b /Lib/importlib/__init__.py | |
parent | 3bee1f1154218b6bdadfe4095ef4b52c3471df01 (diff) | |
download | cpython-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__.py | 4 |
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: |