Set __file__ of bytecode imports
This commit is contained in:
parent
401a5e109c
commit
ec0902b649
@ -136,9 +136,9 @@ def import_file_to_module(module_name, fpath, loader=None):
|
|||||||
sys.modules.pop(module_name, None)
|
sys.modules.pop(module_name, None)
|
||||||
raise
|
raise
|
||||||
sys.modules[module_name] = module
|
sys.modules[module_name] = module
|
||||||
module.__file__ = fpath
|
|
||||||
module.__name__ = module_name
|
module.__name__ = module_name
|
||||||
|
|
||||||
|
module.__file__ = fpath
|
||||||
if loader:
|
if loader:
|
||||||
module.__loader__ = loader
|
module.__loader__ = loader
|
||||||
if is_package(module_name):
|
if is_package(module_name):
|
||||||
|
Loading…
Reference in New Issue
Block a user