From 59aecb1c4265138f9f17f73d38b7287a790d4f94 Mon Sep 17 00:00:00 2001 From: Masashi Honma Date: Mon, 4 Feb 2019 02:39:10 +0200 Subject: [PATCH] tests: Decode StreamRequestHandler read for python3 WPSAPHTTPServer class needs to explicitly decode the read value from a bytes object to a str object. Signed-off-by: Masashi Honma --- tests/hwsim/test_ap_wps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 0aec63d11..0a169def8 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -4107,10 +4107,10 @@ def gen_wps_event(sid='uuid:7eb3342a-8a5f-47fe-a585-0785bfec6d8a'): class WPSAPHTTPServer(StreamRequestHandler): def handle(self): - data = self.rfile.readline().strip() + data = self.rfile.readline().decode().strip() logger.info("HTTP server received: " + data) while True: - hdr = self.rfile.readline().strip() + hdr = self.rfile.readline().decode().strip() if len(hdr) == 0: break logger.info("HTTP header: " + hdr)