Commit f0dfbaf4 authored by Just van Rossum's avatar Just van Rossum

Patch #698082 from Thomas Heller: Modulefinder didn't exclude modules

in packages correctly.
parent 62442c29
......@@ -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:
......
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