diff options
author | Brett Cannon <brett@python.org> | 2012-07-02 18:53:10 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-07-02 18:53:10 (GMT) |
commit | 8e2f5564b3cce162aa1427dcd26092f24f418418 (patch) | |
tree | 383e0f0f2e286c85af805422a71e48d798d07ffe /Lib/importlib/__init__.py | |
parent | 1e331560eea62c78ec189f2b72b59864ee315ddc (diff) | |
download | cpython-8e2f5564b3cce162aa1427dcd26092f24f418418.zip cpython-8e2f5564b3cce162aa1427dcd26092f24f418418.tar.gz cpython-8e2f5564b3cce162aa1427dcd26092f24f418418.tar.bz2 |
Issue #15210: If _frozen_importlib is not found in sys.modules by
importlib.__init__, then catch the KeyError raised, not ImportError.
Diffstat (limited to 'Lib/importlib/__init__.py')
-rw-r--r-- | Lib/importlib/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py index e62bdb1..dad0833 100644 --- a/Lib/importlib/__init__.py +++ b/Lib/importlib/__init__.py @@ -7,7 +7,7 @@ import sys try: _bootstrap = sys.modules['_frozen_importlib'] -except ImportError: +except KeyError: from . import _bootstrap _bootstrap._setup(sys, imp) else: |