From 53089c6e91f6152bc43776587e82a0bbeb574fe0 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Wed, 4 Jul 2012 14:03:40 -0400 Subject: 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. --- Lib/importlib/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/importlib/__init__.py') 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: -- cgit v1.2.1