summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/modulefinder.py4
-rw-r--r--Misc/NEWS2
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index ded3125..25e1482 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -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
diff --git a/Misc/NEWS b/Misc/NEWS
index 809d2d9..f111d0e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -306,6 +306,8 @@ Extension modules
Library
-------
+- Bug #876278: Unbounded recursion in modulefinder
+
- Bug #780300: Swap public and system ID in LexicalHandler.startDTD.
Applications relying on the wrong order need to be corrected.