##// END OF EJS Templates
demandimport: strictly compare identity of proxy object...
Yuya Nishihara -
r32445:84723337 default
parent child Browse files
Show More
@@ -130,12 +130,12 b' class _demandmod(object):'
130 subload(mod, x)
130 subload(mod, x)
131
131
132 # Replace references to this proxy instance with the actual module.
132 # Replace references to this proxy instance with the actual module.
133 if locals and locals.get(head) == self:
133 if locals and locals.get(head) is self:
134 locals[head] = mod
134 locals[head] = mod
135
135
136 for modname in modrefs:
136 for modname in modrefs:
137 modref = sys.modules.get(modname, None)
137 modref = sys.modules.get(modname, None)
138 if modref and getattr(modref, head, None) == self:
138 if modref and getattr(modref, head, None) is self:
139 setattr(modref, head, mod)
139 setattr(modref, head, mod)
140
140
141 object.__setattr__(self, r"_module", mod)
141 object.__setattr__(self, r"_module", mod)
General Comments 0
You need to be logged in to leave comments. Login now