mirror of https://github.com/python/cpython.git
This change makes imputil more closely emulate the standard import
mechanism to support self-modifying modules.
This commit is contained in:
parent
76c066b103
commit
bfae1964c8
|
@ -282,7 +282,8 @@ def _process_result(self, (ispkg, code, values), fqname):
|
|||
if not is_module:
|
||||
exec code in module.__dict__
|
||||
|
||||
return module
|
||||
# fetch from sys.modules instead of returning module directly.
|
||||
return sys.modules[fqname]
|
||||
|
||||
def _load_tail(self, m, parts):
|
||||
"""Import the rest of the modules, down from the top-level module.
|
||||
|
|
Loading…
Reference in New Issue