Commit 18596003 authored by Guido van Rossum's avatar Guido van Rossum

fix reload use of __filename__

parent ba3e46b9
...@@ -102,7 +102,8 @@ class RModuleImporter(ihooks.ModuleImporter): ...@@ -102,7 +102,8 @@ class RModuleImporter(ihooks.ModuleImporter):
def reload(self, module, path=None): def reload(self, module, path=None):
if path is None and hasattr(module, '__filename__'): 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) return ihooks.ModuleImporter.reload(self, module, path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment