[Python-checkins] python/dist/src/Lib modulefinder.py,1.10,1.11

theller at users.sourceforge.net theller at users.sourceforge.net
Tue May 11 11:11:02 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18411

Modified Files:
	modulefinder.py 
Log Message:
Fix SF item #876278: Unbounded recursion in modulefinder.

Already backported to release23-maint.


Index: modulefinder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/modulefinder.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** modulefinder.py	15 Feb 2004 16:43:20 -0000	1.10
--- modulefinder.py	11 May 2004 15:10:59 -0000	1.11
***************
*** 246,249 ****
--- 246,252 ----
              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,
***************
*** 393,396 ****
--- 396,400 ----
      def find_module(self, name, path, parent=None):
          if parent is not None:
+             # assert path is not None
              fullname = parent.__name__+'.'+name
          else:




More information about the Python-checkins mailing list