Donate CPU: Try to fix utf-8 decode problem. Just skip invalid chars, we're not very interested in those.

This commit is contained in:
Daniel Marjamäki 2018-08-28 12:02:28 +02:00
parent ec5a13d351
commit eadb4226e9
1 changed files with 1 additions and 1 deletions

View File

@ -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):