[PATCH v2 25/38] tests: Modify nfc_wps test sets for python3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx>
---
 tests/hwsim/test_nfc_wps.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_nfc_wps.py b/tests/hwsim/test_nfc_wps.py
index be30a99e4..81d952563 100644
--- a/tests/hwsim/test_nfc_wps.py
+++ b/tests/hwsim/test_nfc_wps.py
@@ -8,6 +8,7 @@ from remotehost import remote_compatible
 import time
 import subprocess
 import logging
+import binascii
 logger = logging.getLogger()
 
 import hwsim_utils
@@ -154,7 +155,9 @@ def test_nfc_wps_password_token_ap(dev, apdev):
     dev[0].dump_monitor()
     new_ssid = "test-wps-nfc-pw-token-new-ssid"
     new_passphrase = "1234567890"
-    res = dev[0].request("WPS_REG " + apdev[0]['bssid'] + " nfc-pw " + new_ssid.encode("hex") + " WPA2PSK CCMP " + new_passphrase.encode("hex"))
+    res = dev[0].request("WPS_REG " + apdev[0]['bssid'] + " nfc-pw " +
+        binascii.hexlify(new_ssid.encode()).decode() + " WPA2PSK CCMP " +
+        binascii.hexlify(new_passphrase.encode()).decode())
     if "FAIL" in res:
         raise Exception("Failed to start Registrar using NFC password token")
     dev[0].wait_connected(timeout=30)
-- 
2.17.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux