Fix SF item #876278: Unbounded recursion in modulefinder.
Already backported to release23-maint.
This commit is contained in:
parent
112f8f4f81
commit
2e7c8328ae
|
@ -245,6 +245,9 @@ class ModuleFinder:
|
|||
if self.badmodules.has_key(fqname):
|
||||
self.msgout(3, "import_module -> None")
|
||||
return None
|
||||
if parent and parent.__path__ is None:
|
||||
self.msgout(3, "import_module -> None")
|
||||
return None
|
||||
try:
|
||||
fp, pathname, stuff = self.find_module(partname,
|
||||
parent and parent.__path__, parent)
|
||||
|
@ -392,6 +395,7 @@ class ModuleFinder:
|
|||
|
||||
def find_module(self, name, path, parent=None):
|
||||
if parent is not None:
|
||||
# assert path is not None
|
||||
fullname = parent.__name__+'.'+name
|
||||
else:
|
||||
fullname = name
|
||||
|
|
Loading…
Reference in New Issue