Kaydet (Commit) 8b4b46e4 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix a bug reported by Toby Dickenson (on 18 May 1999).

Sometimes there's no parent, so don't try to get its __name__.
üst cfd76a20
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment