From patchwork Tue Oct 26 16:49:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 283082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9QHeeDY003123 for ; Tue, 26 Oct 2010 17:40:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752407Ab0JZRke (ORCPT ); Tue, 26 Oct 2010 13:40:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53596 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933276Ab0JZRkc (ORCPT ); Tue, 26 Oct 2010 13:40:32 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9QHeUgK021316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 Oct 2010 13:40:32 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9QGnmDA003830; Tue, 26 Oct 2010 12:49:49 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o9QGnjvF022482; Tue, 26 Oct 2010 12:49:47 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 2/5] KVM test: kvm_monitor.py: store attributes in QMPCmdError Date: Tue, 26 Oct 2010 18:49:41 +0200 Message-Id: <1288111784-10188-2-git-send-email-mgoldish@redhat.com> In-Reply-To: <1288111784-10188-1-git-send-email-mgoldish@redhat.com> References: <1288111784-10188-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Oct 2010 17:40:40 +0000 (UTC) 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: