hgdemandimport/demandimportpy2.py
changeset 32445 847233374434
parent 32422 f37f9499fea8
child 32446 63365e9621d6
--- a/hgdemandimport/demandimportpy2.py	Tue May 23 08:49:01 2017 -0700
+++ b/hgdemandimport/demandimportpy2.py	Mon May 01 13:43:31 2017 +0900
@@ -130,12 +130,12 @@
                 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)