aboutsummaryrefslogtreecommitdiffstats
path: root/nodedb.py
diff options
context:
space:
mode:
Diffstat (limited to 'nodedb.py')
-rw-r--r--nodedb.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/nodedb.py b/nodedb.py
index f1110aa..6a4726f 100644
--- a/nodedb.py
+++ b/nodedb.py
@@ -169,12 +169,15 @@ class NodeDB:
def import_aliases(self, aliases):
for mac, alias in aliases.items():
try:
- node = self.maybe_node_by_fuzzy_mac(mac)
+ node = self.maybe_node_by_mac([mac])
except:
- # create an offline node
- node = Node()
- node.add_mac(mac)
- self._nodes.append(node)
+ try:
+ node = self.maybe_node_by_fuzzy_mac(mac)
+ except:
+ # create an offline node
+ node = Node()
+ node.add_mac(mac)
+ self._nodes.append(node)
if 'name' in alias:
node.name = alias['name']