Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fea73ef

Browse files
committed
Issue #14605: Don't error out if get_importer() returns None.
1 parent 6d3b321 commit fea73ef

2 files changed

Lines changed: 1099 additions & 1104 deletions

File tree

Lib/pkgutil.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ def find_loader(fullname):
466466
platform-specific special import locations such as the Windows registry.
467467
"""
468468
for importer in iter_importers(fullname):
469+
if importer is None:
470+
continue
469471
loader = importer.find_module(fullname)
470472
if loader is not None:
471473
return loader

0 commit comments

Comments
 (0)