summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/rexec.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py
index f33041a..9b23b3c 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)