def _remember_interface_info(self, iid): # XXX - there is no good reason to cache this only in each instance # It should be cached at the module level, so we don't need to # rebuild the world for each new object. iis = self.__dict__['_interface_infos_'] assert not iis.has_key(iid), "Already remembered this interface!" try: method_infos, getters, setters, constants = BuildInterfaceInfo(iid) except COMException, why: # Failing to build an interface info generally isn't a real # problem - its probably just that the interface is non-scriptable. logger.info("Failed to build interface info for %s: %s", iid, why) # Remember the fact we failed. iis[iid] = None return
def _remember_interface_info(self, iid): # XXX - there is no good reason to cache this only in each instance # It should be cached at the module level, so we don't need to # rebuild the world for each new object. iis = self.__dict__['_interface_infos_'] assert iid not in iis, "Already remembered this interface!" try: method_infos, getters, setters, constants = BuildInterfaceInfo(iid) except COMException as why: # Failing to build an interface info generally isn't a real # problem - its probably just that the interface is non-scriptable. logger.info("Failed to build interface info for %s: %s", iid, why) # Remember the fact we failed. iis[iid] = None return # Remember all the names so we can delegate iis[iid] = method_infos, getters, setters, constants names = self.__dict__['_name_to_interface_iid_'] for name in list(method_infos.keys()): names[name] = iid for name in list(getters.keys()): names[name] = iid for name in list(setters.keys()): names[name] = iid for name in list(constants.keys()): names[name] = iid