Skip to content
Snippets Groups Projects
Unverified Commit 2c4c1875 authored by lqb's avatar lqb Committed by GitHub
Browse files

Fixed regex for getGateway

parent bedd124b
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ class Statistics(Respondd): ...@@ -141,7 +141,7 @@ class Statistics(Respondd):
lines = lib.helper.call(['batctl', '-m', self._config['batman'], 'gwl', '-n']) lines = lib.helper.call(['batctl', '-m', self._config['batman'], 'gwl', '-n'])
for line in lines: for line in lines:
lineMatch = re.match(r'^(\*|=>) +([0-9a-f:]+) \([\d ]+\) ([0-9a-f:]+)', line) lineMatch = re.match(r'(\*|=>)\s+([0-9a-f:]+)\s\([\d \.]+\)\s+([0-9a-f:]+)', line)
if lineMatch: if lineMatch:
ret = {} ret = {}
ret['gateway'] = lineMatch.group(2) ret['gateway'] = lineMatch.group(2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment