mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
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.
|
||||
"""
|
||||
for importer in iter_importers(fullname):
|
||||
if importer is None:
|
||||
continue
|
||||
loader = importer.find_module(fullname)
|
||||
if loader is not None:
|
||||
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
Block a user