Replace malformed utf-8 characters in spawn output.
Previously this simply crashed if there was ever malformed utf-8 in the stderr or stdout streams, perhaps as a result of an incorrectly spawned command. See e.g. #3222
This commit is contained in:
parent
22434f4d1b
commit
16a9948759
@ -98,8 +98,10 @@ class GUIProcess(QObject):
|
|||||||
log.procs.debug("Process finished with code {}, status {}.".format(
|
log.procs.debug("Process finished with code {}, status {}.".format(
|
||||||
code, status))
|
code, status))
|
||||||
|
|
||||||
stderr = bytes(self._proc.readAllStandardError()).decode('utf-8')
|
stderr = bytes(self._proc.readAllStandardError()).decode('utf-8',
|
||||||
stdout = bytes(self._proc.readAllStandardOutput()).decode('utf-8')
|
'replace')
|
||||||
|
stdout = bytes(self._proc.readAllStandardOutput()).decode('utf-8',
|
||||||
|
'replace')
|
||||||
|
|
||||||
qutescheme.spawn_output = self._spawn_format(code, status,
|
qutescheme.spawn_output = self._spawn_format(code, status,
|
||||||
stdout, stderr)
|
stdout, stderr)
|
||||||
|
Loading…
Reference in New Issue
Block a user