]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Silence unnecessary get_driver_status() prints
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 16 Jul 2015 09:46:01 +0000 (12:46 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 16 Jul 2015 15:26:16 +0000 (18:26 +0300)
Commit 53606b105c6df3c2f3a154b055ac142d5c380251 ('tests: Wait for scan
to complete on all interfaces in reset()') added option of passing
ifname to get_driver_status(). This could result in FAIL-NO-IFNAME-MATCH
returns that get printed out in "Ignore unexpected status-driver line"
messages if the interface is not found. Check for this case to avoid
that unnecessary print.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/wpasupplicant.py

index d097645bcc745f0c84715251f46a7f4e31703dca..e99e91ea2c93fa808a3303216ebe066ebada2b99 100644 (file)
@@ -362,6 +362,8 @@ class WpaSupplicant:
             res = self.request("STATUS-DRIVER")
         else:
             res = self.global_request("IFNAME=%s STATUS-DRIVER" % ifname)
+            if res.startswith("FAIL"):
+                return dict()
         lines = res.splitlines()
         vals = dict()
         for l in lines: