From 94f725656474a019376898b489d49fd3eb91caf6 Mon Sep 17 00:00:00 2001 From: Stefan Laudemann Date: Sun, 1 Feb 2015 03:07:35 +0100 Subject: [PATCH] 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. --- nodedb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodedb.py b/nodedb.py index f0f7240..63c461e 100644 --- a/nodedb.py +++ b/nodedb.py @@ -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