mirror of https://github.com/python/cpython.git
Issue #14605: Don't error out if get_importer() returns None.
This commit is contained in:
parent
6d3b3218be
commit
fea73efc9e
|
@ -466,6 +466,8 @@ def find_loader(fullname):
|
||||||
platform-specific special import locations such as the Windows registry.
|
platform-specific special import locations such as the Windows registry.
|
||||||
"""
|
"""
|
||||||
for importer in iter_importers(fullname):
|
for importer in iter_importers(fullname):
|
||||||
|
if importer is None:
|
||||||
|
continue
|
||||||
loader = importer.find_module(fullname)
|
loader = importer.find_module(fullname)
|
||||||
if loader is not None:
|
if loader is not None:
|
||||||
return loader
|
return loader
|
||||||
|
|
2219
Python/importlib.h
2219
Python/importlib.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue