From eadb4226e9a0d544db7812cfed74eb0acd5e80c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 28 Aug 2018 12:02:28 +0200 Subject: [PATCH] Donate CPU: Try to fix utf-8 decode problem. Just skip invalid chars, we're not very interested in those. --- tools/donate-cpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/donate-cpu.py b/tools/donate-cpu.py index e7e08c4fb..c1c1a33ed 100644 --- a/tools/donate-cpu.py +++ b/tools/donate-cpu.py @@ -129,7 +129,7 @@ def scanPackage(workPath, cppcheck): print(cmd) p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) comm = p.communicate() - errout = comm[1].decode('utf-8') + errout = comm[1].decode(encoding='utf-8', errors='ignore') count = 0 for line in errout.split('\n'): if re.match(r'.*:[0-9]+:.*\]$', line):