Submitter | Yuya Nishihara |
---|---|
Date | May 24, 2017, 3:38 p.m. |
Message ID | <43dcc4aba63fb8af4375.1495640314@mimosa> |
Download | mbox | patch |
Permalink | /patch/20880/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/hgdemandimport/demandimportpy2.py b/hgdemandimport/demandimportpy2.py --- a/hgdemandimport/demandimportpy2.py +++ b/hgdemandimport/demandimportpy2.py @@ -130,12 +130,12 @@ class _demandmod(object): subload(mod, x) # Replace references to this proxy instance with the actual module. - if locals and locals.get(head) == self: + if locals and locals.get(head) is self: locals[head] = mod for modname in modrefs: modref = sys.modules.get(modname, None) - if modref and getattr(modref, head, None) == self: + if modref and getattr(modref, head, None) is self: setattr(modref, head, mod) object.__setattr__(self, r"_module", mod)