Fixed variable name and catches only KeyErrors to not hide other errors.
This commit is contained in:
parent
cd743ff46c
commit
ddf7e4f8db
|
@ -229,6 +229,7 @@ class NodeDB:
|
||||||
for link in self._links:
|
for link in self._links:
|
||||||
ids = link.source.interface
|
ids = link.source.interface
|
||||||
idt = link.target.interface
|
idt = link.target.interface
|
||||||
|
|
||||||
try:
|
try:
|
||||||
node_source = self.maybe_node_by_fuzzy_mac(ids)
|
node_source = self.maybe_node_by_fuzzy_mac(ids)
|
||||||
node_target = self.maybe_node_by_id(idt)
|
node_target = self.maybe_node_by_id(idt)
|
||||||
|
@ -242,7 +243,7 @@ class NodeDB:
|
||||||
# This is for corner cases, when a client
|
# This is for corner cases, when a client
|
||||||
# is linked to another client.
|
# is linked to another client.
|
||||||
clientIds[ids] = str(globalIdCounter)
|
clientIds[ids] = str(globalIdCounter)
|
||||||
id1 = str(globalIdCounter)
|
ids = str(globalIdCounter)
|
||||||
globalIdCounter += 1
|
globalIdCounter += 1
|
||||||
|
|
||||||
clientIds[idt] = str(globalIdCounter)
|
clientIds[idt] = str(globalIdCounter)
|
||||||
|
@ -267,7 +268,7 @@ class NodeDB:
|
||||||
|
|
||||||
link.id = ids + "-" + idt
|
link.id = ids + "-" + idt
|
||||||
|
|
||||||
except:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# extends node id by incremented node counter
|
# extends node id by incremented node counter
|
||||||
|
|
Loading…
Reference in a new issue