Merge from 3.5

This commit is contained in:
Brett Cannon 2016-06-25 10:50:24 -07:00
commit da037616b1
2 changed files with 14 additions and 4 deletions

View file

@ -241,7 +241,7 @@ class _LazyModule(types.ModuleType):
if id(self) != id(sys.modules[original_name]):
msg = ('module object for {!r} substituted in sys.modules '
'during a lazy load')
raise ValueError(msg.format(original_name))
raise ValueError(msg.format(original_name))
# Update after loading since that's what would happen in an eager
# loading situation.
self.__dict__.update(attrs_updated)