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:
Johannes Berg 2014-11-27 18:42:54 +01:00 committed by Jouni Malinen
parent 9363f5e065
commit 6bb9d861f9

View file

@ -308,7 +308,11 @@ class WpaSupplicant:
lines = res.splitlines()
vals = dict()
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
return vals
@ -323,7 +327,11 @@ class WpaSupplicant:
lines = res.splitlines()
vals = dict()
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
return vals