From: Masashi Honma Date: Mon, 4 Feb 2019 00:39:10 +0000 (+0200) Subject: tests: Decode StreamRequestHandler read for python3 X-Git-Tag: hostap_2_8~443 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59aecb1c4265138f9f17f73d38b7287a790d4f94;p=thirdparty%2Fhostap.git 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 --- 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)