commit
b3a921347c
13
nodedb.py
13
nodedb.py
|
@ -169,12 +169,15 @@ class NodeDB:
|
||||||
def import_aliases(self, aliases):
|
def import_aliases(self, aliases):
|
||||||
for mac, alias in aliases.items():
|
for mac, alias in aliases.items():
|
||||||
try:
|
try:
|
||||||
node = self.maybe_node_by_fuzzy_mac(mac)
|
node = self.maybe_node_by_mac([mac])
|
||||||
except:
|
except:
|
||||||
# create an offline node
|
try:
|
||||||
node = Node()
|
node = self.maybe_node_by_fuzzy_mac(mac)
|
||||||
node.add_mac(mac)
|
except:
|
||||||
self._nodes.append(node)
|
# create an offline node
|
||||||
|
node = Node()
|
||||||
|
node.add_mac(mac)
|
||||||
|
self._nodes.append(node)
|
||||||
|
|
||||||
if 'name' in alias:
|
if 'name' in alias:
|
||||||
node.name = alias['name']
|
node.name = alias['name']
|
||||||
|
|
Loading…
Reference in New Issue