|
@@ -72,10 +72,12 @@ class BatmanParser:
|
|
|
# call 'batctl gwl' and parse output lines
|
|
|
rawgwdata = subprocess.check_output([self.batctl, 'gwl'])
|
|
|
gateways = []
|
|
|
- for l in rawgwdata.splitlines()[2:]:
|
|
|
+ for l in rawgwdata.splitlines()[1:]:
|
|
|
m = re.search("^\s*(([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2})\s+", l)
|
|
|
if m is not None:
|
|
|
gateways.append(ffstatus.mac2id(m.group(1)))
|
|
|
+ else:
|
|
|
+ print('Failed to parse gateway from batctl-gwl line:', l)
|
|
|
|
|
|
# call batadv-vis and parse output as unicode JSON
|
|
|
rawdata = subprocess.check_output([self.batadv_vis, '-f', 'jsondoc'])
|