diff options
author | Brett Cannon <brett@python.org> | 2014-02-26 23:26:49 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-02-26 23:26:49 (GMT) |
commit | d3acef9bf4658bfaee0b98b79d4c42406faf7b83 (patch) | |
tree | ec14535bc2da15f88645ee353d1600d8f26b9e31 /Lib/importlib/_bootstrap.py | |
parent | 9fff849dbfe31642fac2e58d42e0ef73891f5c04 (diff) | |
download | cpython-d3acef9bf4658bfaee0b98b79d4c42406faf7b83.zip cpython-d3acef9bf4658bfaee0b98b79d4c42406faf7b83.tar.gz cpython-d3acef9bf4658bfaee0b98b79d4c42406faf7b83.tar.bz2 |
Issue #20763: Fix importlib.machinery.PathFinder to support
PathEntryFinder instances which only define find_module().
Reported by Yukihiro Nakadaira.
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 4864024..beaa9b3 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -1869,7 +1869,7 @@ class PathFinder: loader, portions = finder.find_loader(fullname) else: loader = finder.find_module(fullname) - portions = None + portions = [] if loader is not None: return spec_from_loader(fullname, loader) spec = ModuleSpec(fullname, None) |