tests: Report unexpected STATUS lines instead of stopping
It looks like get_status() has failed in some test runs because of a STATUS command returning an line without '=' on it. Instead of stopping there on exception, report the unexpected line in the log and ignore it to allow test to continue. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
ca5b81a5bb
commit
e01929c668
1 changed files with 5 additions and 2 deletions
|
@ -241,8 +241,11 @@ class WpaSupplicant:
|
|||
lines = res.splitlines()
|
||||
vals = dict()
|
||||
for l in lines:
|
||||
try:
|
||||
[name,value] = l.split('=', 1)
|
||||
vals[name] = value
|
||||
except ValueError, e:
|
||||
logger.info(self.ifname + ": Ignore unexpected STATUS line: " + l)
|
||||
return vals
|
||||
|
||||
def get_status_field(self, field):
|
||||
|
|
Loading…
Reference in a new issue