From 0eb14f4c7c6f53655197a8b76a5e5955404c0417 Mon Sep 17 00:00:00 2001 From: Thomas Hooge Date: Thu, 14 Dec 2023 14:10:08 +0100 Subject: [PATCH] Fix deprecated batctl option --- lib/batman.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/batman.py b/lib/batman.py index 30e9a5a..be50ae9 100644 --- a/lib/batman.py +++ b/lib/batman.py @@ -3,7 +3,6 @@ import json import os import re - class Batman(object): """ Bindings for B.A.T.M.A.N. Advanced @@ -52,10 +51,10 @@ class Batman(object): def gateway_list(self): """ - Parse "batctl -m gwl -n" + Parse "batctl meshif gwl -n" into an array of dictionaries. """ - cmd = ['batctl', '-m', self.mesh_interface, 'gwl', '-n'] + cmd = ['batctl', 'meshif', self.mesh_interface, 'gwl', '-n'] if os.geteuid() > 0: cmd.insert(0, 'sudo') output = subprocess.check_output(cmd, env=self.environ) @@ -81,10 +80,10 @@ class Batman(object): def gateway_mode(self): """ - Parse "batctl -m gw" + Parse "batctl meshif gw" return: tuple mode, bandwidth, if mode != server then bandwidth is None """ - cmd = ['batctl', '-m', self.mesh_interface, 'gw'] + cmd = ['batctl', 'meshif', self.mesh_interface, 'gw'] if os.geteuid() > 0: cmd.insert(0, 'sudo') output = subprocess.check_output(cmd, env=self.environ)