diff options
author | Brett Cannon <brett@python.org> | 2012-04-27 19:45:15 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-27 19:45:15 (GMT) |
commit | fea73efc9ea2a65d73a55f8bab1adfbbca62e38b (patch) | |
tree | 1cffa2268fcd2da4a7e83d76a846bcba79f5980f /Lib/pkgutil.py | |
parent | 6d3b3218be62b723d8aaea1676e8eb7d7b937649 (diff) | |
download | cpython-fea73efc9ea2a65d73a55f8bab1adfbbca62e38b.zip cpython-fea73efc9ea2a65d73a55f8bab1adfbbca62e38b.tar.gz cpython-fea73efc9ea2a65d73a55f8bab1adfbbca62e38b.tar.bz2 |
Issue #14605: Don't error out if get_importer() returns None.
Diffstat (limited to 'Lib/pkgutil.py')
-rw-r--r-- | Lib/pkgutil.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index 932abbc..8e062a4 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -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 |