Decode stderr after executing a replay
The touch tests were showing stderr as a binary string when run in
Python 3,
BUG=none
TEST=run an erroring touch test using Python 3 and check the stderr
Change-Id: I9f547766dffa99e7be4c2a5ed6b6442524aeb482
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/mttools/+/2166455
Tested-by: Harry Cutts <hcutts@chromium.org>
Auto-Submit: Harry Cutts <hcutts@chromium.org>
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
Commit-Queue: Harry Cutts <hcutts@chromium.org>
diff --git a/mtreplay/mtreplay.py b/mtreplay/mtreplay.py
index 98cbe19..ef2b1c2 100755
--- a/mtreplay/mtreplay.py
+++ b/mtreplay/mtreplay.py
@@ -321,6 +321,6 @@
print('Gestures Log: ')
print(self.gestures_log)
print('Standard error:')
- print(process.stderr.read())
+ print(process.stderr.read().decode(errors='replace'))
raise Exception('Error {} from process: {}'
.format(process.returncode, ' '.join(parameters)))