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:
Stefan Laudemann 2015-02-01 03:07:35 +01:00
parent ee8bbd8b3e
commit 94f7256564

View file

@ -110,7 +110,7 @@ class NodeDB:
try:
if 'neighbor' in x:
try:
node = self.maybe_node_by_mac((x['neighbor']))
node = self.maybe_node_by_mac((x['neighbor'], ))
except:
continue