Merge fix for #16163 from 3.3

This commit is contained in:
Nick Coghlan 2013-04-14 23:01:11 +10:00
commit 685bd4a37a
3 changed files with 44 additions and 2 deletions

View file

@ -449,8 +449,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: