From 18596003572b715d57ecb6d357cebc4257c0bb31 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 10 Aug 1995 19:40:39 +0000 Subject: [PATCH] fix reload use of __filename__ --- Lib/rexec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/rexec.py b/Lib/rexec.py index f33041a7c37..9b23b3c601a 100644 --- a/Lib/rexec.py +++ b/Lib/rexec.py @@ -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)