tools (async_process): log command as str

This commit is contained in:
Goffi 2019-08-16 17:06:51 +02:00
commit 4b2d53b797

View file

@ -76,7 +76,8 @@ class CommandProtocol(protocol.ProcessProtocol):
def processEnded(self, reason):
data = b''.join(self.data)
if (reason.value.exitCode == 0):
log.debug(_('{name} command succeed').format(name=self.command_name))
log.debug(_('{name!r} command succeed').format(
name=self.command_name.decode('utf-8', 'ignore')))
# we don't use "replace" on purpose, we want an exception if decoding
# is not working properly
self._deferred.callback(data)