From: Jouni Malinen Date: Wed, 13 Mar 2019 18:40:31 +0000 (+0200) Subject: tests: Decode station dump output to restore pre-python3 behavior X-Git-Tag: hostap_2_8~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e4ad443383febb9da7d0299d751a547ae74aea;p=thirdparty%2Fhostap.git tests: Decode station dump output to restore pre-python3 behavior These TDLS test cases missed Popen() result decode() calls in the earlier python3 compatibility changes. Add those to make debug log more readable. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_tdls.py b/tests/hwsim/test_ap_tdls.py index bba2bacf3..315b2cc9b 100644 --- a/tests/hwsim/test_ap_tdls.py +++ b/tests/hwsim/test_ap_tdls.py @@ -427,7 +427,7 @@ def test_ap_open_tdls_vht80(dev, apdev): stdout=subprocess.PIPE) res = cmd.stdout.read() cmd.stdout.close() - logger.info("Station dump on dev[%d]:\n%s" % (i, res)) + logger.info("Station dump on dev[%d]:\n%s" % (i, res.decode())) except Exception as e: if isinstance(e, Exception) and str(e) == "AP startup failed": if not vht_supported(): @@ -471,7 +471,7 @@ def test_ap_open_tdls_vht80plus80(dev, apdev): stdout=subprocess.PIPE) res = cmd.stdout.read() cmd.stdout.close() - logger.info("Station dump on dev[%d]:\n%s" % (i, res)) + logger.info("Station dump on dev[%d]:\n%s" % (i, res.decode())) except Exception as e: if isinstance(e, Exception) and str(e) == "AP startup failed": if not vht_supported(): @@ -515,7 +515,7 @@ def test_ap_open_tdls_vht160(dev, apdev): stdout=subprocess.PIPE) res = cmd.stdout.read() cmd.stdout.close() - logger.info("Station dump on dev[%d]:\n%s" % (i, res)) + logger.info("Station dump on dev[%d]:\n%s" % (i, res.decode())) except Exception as e: if isinstance(e, Exception) and str(e) == "AP startup failed": if not vht_supported():