# HG changeset patch # User Goffi # Date 1581289000 -3600 # Node ID be5fffe34987a397fe4a03068f2a6ac3f17a4fe1 # Parent 330a5f1d9eea9b79a491fccfc66c0ea09243494c tools (common/async_process): fixed stderr handling + added global "run" diff -r 330a5f1d9eea -r be5fffe34987 sat/tools/common/async_process.py --- a/sat/tools/common/async_process.py Sun Feb 09 23:50:26 2020 +0100 +++ b/sat/tools/common/async_process.py Sun Feb 09 23:56:40 2020 +0100 @@ -87,8 +87,8 @@ "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 @@ cmd_args, **kwargs) return d + + +run = CommandProtocol.run