diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-03 00:35:44 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-03 00:35:44 -0400 |
commit | b845decc22c8082b77e153d6c6b67de251bfb049 (patch) | |
tree | d015a6fb85e444e81831c14cfe16e64ac445b06e /Lib/importlib/_bootstrap.py | |
parent | 0a9a6363025ba16b1c2041a05e6f33ee408b1bda (diff) | |
parent | 5ceef131d42852fc1db1de0dd565196c4e29a397 (diff) | |
download | cpython-b845decc22c8082b77e153d6c6b67de251bfb049.tar.gz cpython-b845decc22c8082b77e153d6c6b67de251bfb049.zip |
merge heads
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index e0f86fc1727..d81e9498ddc 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -927,6 +927,9 @@ def _find_and_load(name, import_): if parent: if parent not in sys.modules: import_(parent) + # Crazy side-effects! + if name in sys.modules: + return sys.modules[name] # Backwards-compatibility; be nicer to skip the dict lookup. parent_module = sys.modules[parent] try: |