diff options
author | Brett Cannon <brett@python.org> | 2012-04-27 15:45:15 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-27 15:45:15 -0400 |
commit | fea73efc9ea2a65d73a55f8bab1adfbbca62e38b (patch) | |
tree | 1cffa2268fcd2da4a7e83d76a846bcba79f5980f /Lib/pkgutil.py | |
parent | merge (diff) | |
download | cpython-fea73efc9ea2a65d73a55f8bab1adfbbca62e38b.tar.gz cpython-fea73efc9ea2a65d73a55f8bab1adfbbca62e38b.tar.bz2 cpython-fea73efc9ea2a65d73a55f8bab1adfbbca62e38b.zip |
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 932abbc1817..8e062a4cd97 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 |