]> granicus.if.org Git - python/commitdiff
Fix a bug reported by Toby Dickenson (on 18 May 1999).
authorGuido van Rossum <guido@python.org>
Tue, 2 Nov 1999 15:46:44 +0000 (15:46 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 2 Nov 1999 15:46:44 +0000 (15:46 +0000)
Sometimes there's no parent, so don't try to get its __name__.

Tools/freeze/modulefinder.py

index c2857876c35b12777549ddce7175ce10da5c5b48..ddead2221f9fea5f4420e51bf91d9a5a2231679b 100644 (file)
@@ -220,7 +220,8 @@ class ModuleFinder:
             return m
         if self.badmodules.has_key(fqname):
             self.msgout(3, "import_module -> None")
-            self.badmodules[fqname][parent.__name__] = None
+            if parent:
+                self.badmodules[fqname][parent.__name__] = None
             return None
         try:
             fp, pathname, stuff = self.find_module(partname,