]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix check_sae_pk_capab() with non-SAE builds
authorJouni Malinen <j@w1.fi>
Sat, 13 Mar 2021 22:51:23 +0000 (00:51 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Mar 2021 11:08:04 +0000 (13:08 +0200)
dev.get_capability() returns None in such a case.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/utils.py

index f35831aa8c0aaba02d0a7c9d71cc00b944f34acf..4e88626615d5224052eeee0977d373dd21c4c760 100644 (file)
@@ -114,7 +114,8 @@ def check_sae_capab(dev):
         raise HwsimSkip("SAE not supported")
 
 def check_sae_pk_capab(dev):
-    if "PK" not in dev.get_capability("sae"):
+    capab = dev.get_capability("sae")
+    if capab is None or "PK" not in capab:
         raise HwsimSkip("SAE-PK not supported")
 
 def check_erp_capa(dev):