commit 6738b3d51ca6f6e68ad610be948efeac02045d29
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Thu Oct 11 14:51:40 2012 +0200
NetTestSlave: Raise CommandException with more info
This patch adds pretty-formatted error message to CommandExceptions.
Signed-off-by: Radek Pazdera <rpazdera(a)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()
Show replies by date