mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Merged revisions 67046 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67046 | thomas.heller | 2008-10-30 21:18:13 +0100 (Do, 30 Okt 2008) | 2 lines Fixed a modulefinder crash on certain relative imports. ........
This commit is contained in:
parent
b74777ed33
commit
68daeb0f85
3 changed files with 22 additions and 1 deletions
|
|
@ -309,7 +309,10 @@ class ModuleFinder:
|
|||
def _add_badmodule(self, name, caller):
|
||||
if name not in self.badmodules:
|
||||
self.badmodules[name] = {}
|
||||
self.badmodules[name][caller.__name__] = 1
|
||||
if caller:
|
||||
self.badmodules[name][caller.__name__] = 1
|
||||
else:
|
||||
self.badmodules[name]["-"] = 1
|
||||
|
||||
def _safe_import_hook(self, name, caller, fromlist, level=-1):
|
||||
# wrapper for self.import_hook() that won't raise ImportError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue