mirror of
https://github.com/python/cpython.git
synced 2025-09-20 15:40:32 +00:00
Issue #14605: Don't error out if get_importer() returns None.
This commit is contained in:
parent
6d3b3218be
commit
fea73efc9e
2 changed files with 1108 additions and 1113 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue