From: Jouni Malinen Date: Tue, 4 Feb 2014 11:22:10 +0000 (+0200) Subject: tests: Report unexpected STATUS lines instead of stopping X-Git-Tag: hostap_2_1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e01929c668c7963ee4fc06134c580d3395fe85f4;p=thirdparty%2Fhostap.git 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 --- 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):