Adds missing comma to pass (x['neighbor'], ) as tuple (not as str).
As Python interprets "(elem)" as string and not as tuple, maybe_node_by_mac() iterates over the single characters in the MAC- addressed passed as parameter when called parse_vis_data(). Most of the calls already use the "(elem, )" syntax to indicate that a tuple is passed. However, there is still one call for which this is not the case causing a noticable longer runtime due to calls to maybe_node_by_mac() that cannot yield any useful result.
This commit is contained in:
parent
ee8bbd8b3e
commit
94f7256564
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ class NodeDB:
|
||||||
try:
|
try:
|
||||||
if 'neighbor' in x:
|
if 'neighbor' in x:
|
||||||
try:
|
try:
|
||||||
node = self.maybe_node_by_mac((x['neighbor']))
|
node = self.maybe_node_by_mac((x['neighbor'], ))
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue