Mercurial > libervia-backend
comparison sat/tools/common/async_process.py @ 3033:0d55a52056f7
tools (async_process): log command as str
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Aug 2019 17:06:51 +0200 |
parents | ab2696e34d29 |
children | fee60f17ebac |
comparison
equal
deleted
inserted
replaced
3032:95e2fd14a761 | 3033:0d55a52056f7 |
---|---|
74 self.err_data.append(data) | 74 self.err_data.append(data) |
75 | 75 |
76 def processEnded(self, reason): | 76 def processEnded(self, reason): |
77 data = b''.join(self.data) | 77 data = b''.join(self.data) |
78 if (reason.value.exitCode == 0): | 78 if (reason.value.exitCode == 0): |
79 log.debug(_('{name} command succeed').format(name=self.command_name)) | 79 log.debug(_('{name!r} command succeed').format( |
80 name=self.command_name.decode('utf-8', 'ignore'))) | |
80 # we don't use "replace" on purpose, we want an exception if decoding | 81 # we don't use "replace" on purpose, we want an exception if decoding |
81 # is not working properly | 82 # is not working properly |
82 self._deferred.callback(data) | 83 self._deferred.callback(data) |
83 else: | 84 else: |
84 err_data = b''.join(self.err_data) | 85 err_data = b''.join(self.err_data) |