From 157041e6f8ac8b547052e145753bdad306647349 Mon Sep 17 00:00:00 2001 From: Ivan Novoselov Date: Fri, 13 Oct 2023 08:51:54 +0100 Subject: [PATCH] [CPU] Improve Commit slider's handling of non-decodable characters (#20149) --- .../intel_cpu/tools/commit_slider/utils/helpers.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py b/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py index c30c5773467b4f..3adf6e65025af4 100644 --- a/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py +++ b/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py @@ -191,14 +191,10 @@ def runCommandList(commit, cfgData, enforceClean=False): ) proc = subprocess.Popen( formattedCmd, cwd=cwd, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT + stderr=subprocess.STDOUT, + encoding="utf-8", errors="replace" ) for line in proc.stdout: - # decode if line is byte-type - try: - line = line.decode("utf-8") - except (UnicodeDecodeError, AttributeError): - pass sys.stdout.write(line) commitLogger.info(line) if "catchMsg" in cmd: