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)
|
||||
raise
|
||||
sys.modules[module_name] = module
|
||||
module.__file__ = fpath
|
||||
module.__name__ = module_name
|
||||
|
||||
module.__file__ = fpath
|
||||
if loader:
|
||||
module.__loader__ = loader
|
||||
if is_package(module_name):
|
||||
|
Loading…
x
Reference in New Issue
Block a user