]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix reload use of __filename__
authorGuido van Rossum <guido@python.org>
Thu, 10 Aug 1995 19:40:39 +0000 (19:40 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 10 Aug 1995 19:40:39 +0000 (19:40 +0000)
Lib/rexec.py

index f33041a7c37e9492f8ddf6e722b28a2606af64f6..9b23b3c601a5e4c0c0e3f77f88594d901e3544cd 100644 (file)
@@ -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)