Given an IP address, return the interface that 'owns' this address

def interface_by_ipaddr(self, ipaddr):
        '''
        Given an IP address, return the interface that 'owns' this address
        '''
        ipaddr = IPAddr(ipaddr)
        for devname,iface in self._devinfo.items():
            if iface.ipaddr == ipaddr:
                return iface
        raise KeyError("No device has IP address {}".format(ipaddr))