Mercurial > cpython-lru_cache-weakref
diff Lib/pkgutil.py @ 76584:141ed4b426e1
Issue #14605: Don't error out if get_importer() returns None.
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Fri, 27 Apr 2012 15:45:15 -0400 |
| parents | 57d558f1904d |
| children | 702009f3c0b1 |
line wrap: on
line diff
--- a/Lib/pkgutil.py Fri Apr 27 15:31:45 2012 -0400 +++ b/Lib/pkgutil.py Fri Apr 27 15:45:15 2012 -0400 @@ -466,6 +466,8 @@ 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
