tests: Fix check_sae_pk_capab() with non-SAE builds

dev.get_capability() returns None in such a case.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-03-14 00:51:23 +02:00
parent 57550cb27a
commit 577abde952

View file

@ -114,7 +114,8 @@ def check_sae_capab(dev):
raise HwsimSkip("SAE not supported") raise HwsimSkip("SAE not supported")
def check_sae_pk_capab(dev): 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") raise HwsimSkip("SAE-PK not supported")
def check_erp_capa(dev): def check_erp_capa(dev):