diff mbox

[KVM-AUTOTEST,2/5] KVM test: kvm_monitor.py: store attributes in QMPCmdError

Message ID 1288111784-10188-2-git-send-email-mgoldish@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Goldish Oct. 26, 2010, 4:49 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm/kvm_monitor.py
index e0365cd..7f5ddf8 100644
--- a/client/tests/kvm/kvm_monitor.py
+++ b/client/tests/kvm/kvm_monitor.py
@@ -38,9 +38,15 @@  class MonitorNotSupportedError(MonitorError):
 
 
 class QMPCmdError(MonitorError):
+    def __init__(self, cmd, qmp_args, data):
+        MonitorError.__init__(self, cmd, qmp_args, data)
+        self.cmd = cmd
+        self.qmp_args = qmp_args
+        self.data = data
+
     def __str__(self):
-        return ("QMP command '%s' failed (arguments: %r, error message: %r)" %
-                tuple(self.args))
+        return ("QMP command %r failed (arguments: %r, error message: %r)" %
+                (self.cmd, self.qmp_args, self.data))
 
 
 class Monitor: