diff options
Diffstat (limited to 'Lib/pkgutil.py')
-rw-r--r-- | Lib/pkgutil.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index a5de04d..20e6498 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -451,8 +451,8 @@ def iter_importers(fullname=""): if '.' in fullname: # Get the containing package's __path__ pkg_name = fullname.rpartition(".")[0] - pkg = importlib.import_module(pkg) - path = getattr(sys.modules[pkg], '__path__', None) + pkg = importlib.import_module(pkg_name) + path = getattr(pkg, '__path__', None) if path is None: return else: |