From: Thomas Heller Date: Tue, 11 May 2004 15:00:07 +0000 (+0000) Subject: Fix SF item #876278: Unbounded recursion in modulefinder. X-Git-Tag: v2.3.4c1~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6782986c193882144d307e0369accfac4a090de;p=thirdparty%2FPython%2Fcpython.git Fix SF item #876278: Unbounded recursion in modulefinder. --- diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index 6dec0e5903d9..97a6c2501077 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 63cec4c20568..d682acc5d453 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -42,6 +42,8 @@ Core and builtins Library ------- +- Bug #876278: Unbounded recursion in modulefinder + - Brought platform.py in line with the 2.4 version, fixing support for newer Windows versions and a cache issue.