summaryrefslogtreecommitdiff
path: root/Lib/modulefinder.py
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-03-05 17:23:48 +0000
committerJust van Rossum <just@letterror.com>2003-03-05 17:23:48 +0000
commite7179c0529dcc60af8ff2c5cba4161b83473e3ed (patch)
tree94fe1e4168e4ba38f87679c26181c54dab252ae8 /Lib/modulefinder.py
parentf9e8779fe2cea85c228db96c218743ae7793cd70 (diff)
downloadcpython-e7179c0529dcc60af8ff2c5cba4161b83473e3ed.tar.gz
Patch #698082 from Thomas Heller: Modulefinder didn't exclude modules
in packages correctly.
Diffstat (limited to 'Lib/modulefinder.py')
-rw-r--r--Lib/modulefinder.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index f551a76531..92ecbcb80c 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -242,7 +242,7 @@ class ModuleFinder:
return None
try:
fp, pathname, stuff = self.find_module(partname,
- parent and parent.__path__)
+ parent and parent.__path__, parent)
except ImportError:
self.msgout(3, "import_module ->", None)
return None
@@ -385,9 +385,9 @@ class ModuleFinder:
self.modules[fqname] = m = Module(fqname)
return m
- def find_module(self, name, path):
- if path:
- fullname = '.'.join(path)+'.'+name
+ def find_module(self, name, path, parent=None):
+ if parent is not None:
+ fullname = parent.__name__+'.'+name
else:
fullname = name
if fullname in self.excludes: