tests: Use binary mode for writing WPS attributes
This is needed for python3. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
parent
59aecb1c42
commit
4aa2336ed5
1 changed files with 1 additions and 1 deletions
|
@ -619,7 +619,7 @@ def test_ap_wps_reg_override_ap_settings(dev, apdev):
|
||||||
data += build_wsc_attr(ATTR_ENCR_TYPE, b'\x00\x01')
|
data += build_wsc_attr(ATTR_ENCR_TYPE, b'\x00\x01')
|
||||||
data += build_wsc_attr(ATTR_NETWORK_KEY, b'')
|
data += build_wsc_attr(ATTR_NETWORK_KEY, b'')
|
||||||
data += build_wsc_attr(ATTR_MAC_ADDR, binascii.unhexlify(apdev[1]['bssid'].replace(':', '')))
|
data += build_wsc_attr(ATTR_MAC_ADDR, binascii.unhexlify(apdev[1]['bssid'].replace(':', '')))
|
||||||
with open(ap_settings, "w") as f:
|
with open(ap_settings, "wb") as f:
|
||||||
f.write(data)
|
f.write(data)
|
||||||
ssid = "test-wps-reg-ap-pin"
|
ssid = "test-wps-reg-ap-pin"
|
||||||
appin = "12345670"
|
appin = "12345670"
|
||||||
|
|
Loading…
Reference in a new issue