tests: Ignore status responses without =
There are valid status (and possibly status-driver) responses that don't have a name=value format, ignore those in the test framework parser. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
9363f5e065
commit
6bb9d861f9
1 changed files with 10 additions and 2 deletions
|
@ -308,7 +308,11 @@ class WpaSupplicant:
|
||||||
lines = res.splitlines()
|
lines = res.splitlines()
|
||||||
vals = dict()
|
vals = dict()
|
||||||
for l in lines:
|
for l in lines:
|
||||||
[name,value] = l.split('=', 1)
|
try:
|
||||||
|
[name,value] = l.split('=', 1)
|
||||||
|
except ValueError:
|
||||||
|
logger.info(self.ifname + ": Ignore unexpected status line: " + l)
|
||||||
|
continue
|
||||||
vals[name] = value
|
vals[name] = value
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
|
@ -323,7 +327,11 @@ class WpaSupplicant:
|
||||||
lines = res.splitlines()
|
lines = res.splitlines()
|
||||||
vals = dict()
|
vals = dict()
|
||||||
for l in lines:
|
for l in lines:
|
||||||
[name,value] = l.split('=', 1)
|
try:
|
||||||
|
[name,value] = l.split('=', 1)
|
||||||
|
except ValueError:
|
||||||
|
logger.info(self.ifname + ": Ignore unexpected status-driver line: " + l)
|
||||||
|
continue
|
||||||
vals[name] = value
|
vals[name] = value
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue