tools (common/async_process): fixed stderr handling + added global "run"
This commit is contained in:
parent
d0741de2ad
commit
bc3abd6920
1 changed files with 5 additions and 2 deletions
|
|
@ -87,8 +87,8 @@ class CommandProtocol(protocol.ProcessProtocol):
|
|||
"stderr:\n{stderr}\n{stdout}\n")
|
||||
.format(name = self.command_name,
|
||||
code = reason.value.exitCode,
|
||||
stderr= err_data.encode('utf-8', 'replace'),
|
||||
stdout = "stdout: " + data.decode('utf-8', 'replace')
|
||||
stderr= err_data.decode(errors='replace'),
|
||||
stdout = "stdout: " + data.decode(errors='replace')
|
||||
if data else '',
|
||||
))
|
||||
self._deferred.errback(Failure(exceptions.CommandException(
|
||||
|
|
@ -137,3 +137,6 @@ class CommandProtocol(protocol.ProcessProtocol):
|
|||
cmd_args,
|
||||
**kwargs)
|
||||
return d
|
||||
|
||||
|
||||
run = CommandProtocol.run
|
||||
|
|
|
|||
Loading…
Reference in a new issue