Merge pull request #26 from T-X/for-upstream

try non-fuzzy prior fuzzy mac matching
rewrite
Nils Schneider 2014-05-02 08:55:19 +02:00
commit b3a921347c
1 changed files with 8 additions and 5 deletions

View File

@ -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']