From: Jouni Malinen Date: Sat, 13 Mar 2021 22:51:23 +0000 (+0200) Subject: tests: Fix check_sae_pk_capab() with non-SAE builds X-Git-Tag: hostap_2_10~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=577abde952d03b0515a7a72575e7d225156dc413;p=thirdparty%2Fhostap.git tests: Fix check_sae_pk_capab() with non-SAE builds dev.get_capability() returns None in such a case. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/utils.py b/tests/hwsim/utils.py index f35831aa8..4e8862661 100644 --- a/tests/hwsim/utils.py +++ b/tests/hwsim/utils.py @@ -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):