diff --git a/backend.py b/backend.py index f13dff4..e5c5206 100755 --- a/backend.py +++ b/backend.py @@ -82,7 +82,7 @@ def main(params): # acquire gwl and visdata for each batman instance mesh_info = [] for batman in batman_instances: - vd = batman.vis_data(True) + vd = batman.vis_data() gwl = batman.gateway_list() mesh_info.append((vd, gwl)) diff --git a/lib/batman.py b/lib/batman.py index 4f6b943..5c48740 100644 --- a/lib/batman.py +++ b/lib/batman.py @@ -15,11 +15,8 @@ class Batman(object): # compile regular expressions only once on startup self.mac_addr_pattern = re.compile(r'(([a-z0-9]{2}:){5}[a-z0-9]{2})') - def vis_data(self, batadv_vis=False): - vds = self.vis_data_batctl_legacy() - if batadv_vis: - vds += self.vis_data_batadv_vis() - return vds + def vis_data(self): + return self.vis_data_batadv_vis() @staticmethod def vis_data_helper(lines): @@ -32,17 +29,6 @@ class Batman(object): pass return vd_tmp - def vis_data_batctl_legacy(self): - """ - Parse "batctl -m vd json -n" - into an array of dictionaries. - """ - output = subprocess.check_output( - ['batctl', '-m', self.mesh_interface, 'vd', 'json', '-n']) - lines = output.splitlines() - vds = self.vis_data_helper(lines) - return vds - def vis_data_batadv_vis(self): """ Parse "batadv-vis -i -f json"