tests: Report unknown WpaSupplicant::connect() arguments
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
db23b8f95b
commit
b96a4fa996
1 changed files with 9 additions and 0 deletions
|
@ -1110,6 +1110,15 @@ class WpaSupplicant:
|
|||
if field in kwargs and kwargs[field]:
|
||||
self.set_network(id, field, kwargs[field])
|
||||
|
||||
known_args = {"raw_psk", "password_hex", "peerkey", "okc", "ocsp",
|
||||
"only_add_network", "wait_connect"}
|
||||
unknown = set(kwargs.keys())
|
||||
unknown -= set(quoted)
|
||||
unknown -= set(not_quoted)
|
||||
unknown -= known_args
|
||||
if unknown:
|
||||
raise Exception("Unknown WpaSupplicant::connect() arguments: " + str(unknown))
|
||||
|
||||
if "raw_psk" in kwargs and kwargs['raw_psk']:
|
||||
self.set_network(id, "psk", kwargs['raw_psk'])
|
||||
if "password_hex" in kwargs and kwargs['password_hex']:
|
||||
|
|
Loading…
Reference in a new issue