database.connect()
def findNIC(self, mac):
database.clear_cache()
- return database.NIC.query().filter_by(mac_addr=mac).one()
+ return database.NIC.query().filter_by(mac_addr=mac).first()
def find_interface(self, packet):
chaddr = hwmac(packet.GetHardwareAddress())
nic = self.findNIC(str(chaddr))