def _matchResource(self, other): try: if other.isGeneric(): return False other_addresses = other.getAddresses() except NotImplementedError: return False return matchAddresses(self.addresses, other_addresses)
def _matchResource(self, other): if not self.hasAddresses(): return False try: if not other.hasAddresses(): return False other_addresses = other.getAddresses() except NotImplementedError: return False return matchAddresses((self.address,), other_addresses)