This patch adds pretty-formatted error message to CommandExceptions.
Signed-off-by: Radek Pazdera rpazdera@redhat.com --- NetTest/NetTestSlave.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/NetTest/NetTestSlave.py b/NetTest/NetTestSlave.py index 765094f..de44618 100644 --- a/NetTest/NetTestSlave.py +++ b/NetTest/NetTestSlave.py @@ -127,7 +127,11 @@ class NetTestSlaveXMLRPC: return NetTestCommand(self._command_context, command).run() except: log_exc_traceback() - raise CommandException(command) + cmd_type = command["type"] + m_id = command["machine_id"] + msg = "Execution of %s command on machine %s failed" \ + % (cmd_type, m_id) + raise CommandException(msg)
def machine_cleanup(self): NetConfigDeviceAllCleanup()