From: Masashi Honma Date: Mon, 4 Feb 2019 00:41:19 +0000 (+0200) Subject: tests: Use binary mode for writing WPS attributes X-Git-Tag: hostap_2_8~442 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4aa2336ed5520b4d21f728cb885775f8b4f249bf;p=thirdparty%2Fhostap.git tests: Use binary mode for writing WPS attributes This is needed for python3. Signed-off-by: Masashi Honma --- 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"