From d9451e2ea7ee2f3ee0552e9f9add9cf6dce23937 Mon Sep 17 00:00:00 2001 From: Daniel Ehlers Date: Thu, 30 Jan 2014 19:10:48 +0100 Subject: [PATCH] alfred: Mark all nodes from legacy support. --- batman.py | 5 ++++- nodedb.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/batman.py b/batman.py index 1260ad1..c33f3e0 100755 --- a/batman.py +++ b/batman.py @@ -27,7 +27,10 @@ class batman: """ output = subprocess.check_output(["batctl","-m",self.mesh_interface,"vd","json","-n"]) lines = output.splitlines() - return self.vis_data_helper(lines) + vds = self.vis_data_helper(lines) + for vd in vds: + vd['legacy'] = True + return vds def vis_data_batadv_vis(self): """ Parse "batadv-vis -i -f json" into an array of dictionaries. diff --git a/nodedb.py b/nodedb.py index 8685c81..9dd9849 100644 --- a/nodedb.py +++ b/nodedb.py @@ -52,6 +52,8 @@ class NodeDB: except: node = Node() node.flags['online'] = True + if 'legacy' in x: + node.flags['legacy'] = True self._nodes.append(node) node.add_mac(x['of']) @@ -65,6 +67,8 @@ class NodeDB: except: node = Node() node.flags['online'] = True + if 'legacy' in x: + node.flags['legacy'] = True node.add_mac(x['router']) self._nodes.append(node)