remove fuzzy matching
parent
0d71de7091
commit
a5cb5f0fdb
13
nodedb.py
13
nodedb.py
|
@ -56,16 +56,6 @@ class NodeDB:
|
|||
except:
|
||||
pass
|
||||
|
||||
def maybe_node_by_fuzzy_mac(self, mac):
|
||||
mac_a = mac.lower()
|
||||
|
||||
for node in self._nodes:
|
||||
for mac_b in node.macs:
|
||||
if is_derived_mac(mac_a, mac_b):
|
||||
return node
|
||||
|
||||
raise KeyError
|
||||
|
||||
def maybe_node_by_mac(self, macs):
|
||||
for node in self._nodes:
|
||||
for mac in macs:
|
||||
|
@ -206,9 +196,6 @@ class NodeDB:
|
|||
for mac, alias in aliases.items():
|
||||
try:
|
||||
node = self.maybe_node_by_mac([mac])
|
||||
except:
|
||||
try:
|
||||
node = self.maybe_node_by_fuzzy_mac(mac)
|
||||
except:
|
||||
# create an offline node
|
||||
node = Node()
|
||||
|
|
Loading…
Reference in New Issue