From e01929c668c7963ee4fc06134c580d3395fe85f4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 4 Feb 2014 13:22:10 +0200 Subject: [PATCH] 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 --- tests/hwsim/wpasupplicant.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 26a49d5bf..a276fea5a 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -241,8 +241,11 @@ class WpaSupplicant: lines = res.splitlines() vals = dict() for l in lines: - [name,value] = l.split('=', 1) - vals[name] = value + 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):