]> granicus.if.org Git - python/commitdiff
Nick Mathewson: Make sure the recursion is handled properly.
authorFred Drake <fdrake@acm.org>
Mon, 13 Aug 2001 20:20:51 +0000 (20:20 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 13 Aug 2001 20:20:51 +0000 (20:20 +0000)
This is part of SF patch #440292.

Lib/pyclbr.py

index 4a153caf98e42df072eb458e697d5ca761d9b561..95479a72a46096a4489cc533c4563e324331a39d 100644 (file)
@@ -166,8 +166,8 @@ def readmodule_ex(module, path=[], inpackage=0):
         # Dotted module name
         package = module[:i].strip()
         submodule = module[i+1:].strip()
-        parent = readmodule(package, path, inpackage)
-        child = readmodule(submodule, parent['__path__'], 1)
+        parent = readmodule_ex(package, path, inpackage)
+        child = readmodule_ex(submodule, parent['__path__'], 1)
         return child
 
     if _modules.has_key(module):
@@ -295,7 +295,7 @@ def readmodule_ex(module, path=[], inpackage=0):
                 n = n.strip()
                 try:
                     # recursively read the imported module
-                    d = readmodule(n, path, inpackage)
+                    d = readmodule_ex(n, path, inpackage)
                 except:
                     ##print 'module', n, 'not found'
                     pass
@@ -306,7 +306,7 @@ def readmodule_ex(module, path=[], inpackage=0):
             names = m.group("ImportFromList").split(',')
             try:
                 # recursively read the imported module
-                d = readmodule(mod, path, inpackage)
+                d = readmodule_ex(mod, path, inpackage)
             except:
                 ##print 'module', mod, 'not found'
                 continue