Skip to content
Snippets Groups Projects
Unverified Commit 6a137809 authored by Annika Wickert's avatar Annika Wickert Committed by GitHub
Browse files

Merge pull request #1 from lqb/patch-1

Fixed regex for getGateway
parents f3c2deef 2c4c1875
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 register or to comment