From 4b2d53b797b5b6b7333f440c10f18a866e5a10fe Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 16 Aug 2019 17:06:51 +0200 Subject: [PATCH] tools (async_process): log command as str --- sat/tools/common/async_process.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sat/tools/common/async_process.py b/sat/tools/common/async_process.py index 23c33c7e..686673e3 100644 --- a/sat/tools/common/async_process.py +++ b/sat/tools/common/async_process.py @@ -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)