mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
Fix a bug reported by Toby Dickenson (on 18 May 1999).
Sometimes there's no parent, so don't try to get its __name__.
This commit is contained in:
parent
cfd76a202b
commit
8b4b46e4f3
1 changed files with 2 additions and 1 deletions
|
|
@ -220,7 +220,8 @@ def import_module(self, partname, fqname, parent):
|
|||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue