From: Lucas Bates Date: Fri, 16 Nov 2018 22:37:55 +0000 (-0500) Subject: tc-testing: tdc.py: ignore errors when decoding stdout/stderr X-Git-Tag: v4.19.9~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9806e7473d10988677c3404301dbbc00cb6d8858;p=platform%2Fkernel%2Flinux-rpi3.git tc-testing: tdc.py: ignore errors when decoding stdout/stderr [ Upstream commit 5aaf6428526bcad98d6f51f2f679c919bb75d7e9 ] Prevent exceptions from being raised while decoding output from an executed command. There is no impact on tdc's execution and the verify command phase would fail the pattern match. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py index 87a04a8..9b3f414 100755 --- a/tools/testing/selftests/tc-testing/tdc.py +++ b/tools/testing/selftests/tc-testing/tdc.py @@ -134,9 +134,9 @@ def exec_cmd(args, pm, stage, command): (rawout, serr) = proc.communicate() if proc.returncode != 0 and len(serr) > 0: - foutput = serr.decode("utf-8") + foutput = serr.decode("utf-8", errors="ignore") else: - foutput = rawout.decode("utf-8") + foutput = rawout.decode("utf-8", errors="ignore") proc.stdout.close() proc.stderr.close()