From 8b4b46e4f3d9d80bfc09961efaf5fc65807e34ab Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 2 Nov 1999 15:46:44 +0000 Subject: Fix a bug reported by Toby Dickenson (on 18 May 1999). Sometimes there's no parent, so don't try to get its __name__. --- Tools/freeze/modulefinder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/freeze/modulefinder.py b/Tools/freeze/modulefinder.py index c285787..ddead22 100644 --- a/Tools/freeze/modulefinder.py +++ b/Tools/freeze/modulefinder.py @@ -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, -- cgit v0.12