Ignore errors when decoding subprocess output.

This would otherwise fail on Windows because … get translated to an UTF-8 NEL
(U+0085)...
This commit is contained in:
Florian Bruhin 2015-10-14 20:48:12 +02:00
parent be20001594
commit b878b139dd

View File

@ -97,7 +97,7 @@ class Process(QObject):
"""Read the log from the process' stdout."""
while self.proc.canReadLine():
line = self.proc.readLine()
line = bytes(line).decode('utf-8').rstrip('\r\n')
line = bytes(line).decode('utf-8', errors='ignore').rstrip('\r\n')
try:
parsed = self._parse_line(line)