mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
fix reload use of __filename__
This commit is contained in:
parent
ba3e46b9ce
commit
1859600357
1 changed files with 2 additions and 1 deletions
|
@ -102,7 +102,8 @@ class RModuleImporter(ihooks.ModuleImporter):
|
|||
|
||||
def reload(self, module, path=None):
|
||||
if path is None and hasattr(module, '__filename__'):
|
||||
path = [module.__filename__]
|
||||
head, tail = os.path.split(module.__filename__)
|
||||
path = [head]
|
||||
return ihooks.ModuleImporter.reload(self, module, path)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue