summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-11-02 15:46:44 (GMT)
committerGuido van Rossum <guido@python.org>1999-11-02 15:46:44 (GMT)
commit8b4b46e4f3d9d80bfc09961efaf5fc65807e34ab (patch)
tree69315b13380af0538e4909757fe34e4bf58030ac
parentcfd76a202b6af2d989996727f7433d79c0c4b040 (diff)
downloadcpython-8b4b46e4f3d9d80bfc09961efaf5fc65807e34ab.zip
cpython-8b4b46e4f3d9d80bfc09961efaf5fc65807e34ab.tar.gz
cpython-8b4b46e4f3d9d80bfc09961efaf5fc65807e34ab.tar.bz2
Fix a bug reported by Toby Dickenson (on 18 May 1999).
Sometimes there's no parent, so don't try to get its __name__.
-rw-r--r--Tools/freeze/modulefinder.py3
1 files changed, 2 insertions, 1 deletions
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,