From 4aa2336ed5520b4d21f728cb885775f8b4f249bf Mon Sep 17 00:00:00 2001 From: Masashi Honma Date: Mon, 4 Feb 2019 02:41:19 +0200 Subject: [PATCH] tests: Use binary mode for writing WPS attributes This is needed for python3. Signed-off-by: Masashi Honma --- tests/hwsim/test_ap_wps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 0a169def8..7c3089d94 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -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_NETWORK_KEY, b'') 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) ssid = "test-wps-reg-ap-pin" appin = "12345670"