[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/18] Make qmp.py easier to use
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 16/18] Make qmp.py easier to use |
Date: |
Wed, 30 Nov 2011 15:03:46 -0600 |
---
QMP/qmp.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/QMP/qmp.py b/QMP/qmp.py
index c7dbea0..36ecc1d 100644
--- a/QMP/qmp.py
+++ b/QMP/qmp.py
@@ -128,6 +128,12 @@ class QEMUMonitorProtocol:
qmp_cmd['id'] = id
return self.cmd_obj(qmp_cmd)
+ def command(self, cmd, **kwds):
+ ret = self.cmd(cmd, kwds)
+ if ret.has_key('error'):
+ raise Exception(ret['error']['desc'])
+ return ret['return']
+
def get_events(self, wait=False):
"""
Get a list of available QMP events.
--
1.7.4.1
- [Qemu-devel] [PATCH 04/18] qdev: provide an interface to return canonical path from root, (continued)
- [Qemu-devel] [PATCH 04/18] qdev: provide an interface to return canonical path from root, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 05/18] qdev: provide a path resolution, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 01/18] qom: add new dynamic property infrastructure based on Visitors, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 07/18] qom: add link properties, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 06/18] qom: add child properties (composition), Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 02/18] qom: register legacy properties as new style properties, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 08/18] qapi: allow a 'gen' key to suppress code generation, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 10/18] qom: qom_{get,set} monitor commands, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 11/18] qdev: add explicitly named devices to the root complex, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 17/18] Add test tools, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 16/18] Make qmp.py easier to use,
Anthony Liguori <=
- [Qemu-devel] [PATCH 18/18] qdev: split out QOM functions to separate files, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 13/18] rtc: make piix3 set the rtc as a child, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 09/18] qmp: add qom-list command, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 15/18] qom: optimize qdev_get_canonical_path using a parent link, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 12/18] dev: add an anonymous peripheral container, Anthony Liguori, 2011/11/30
- [Qemu-devel] [PATCH 14/18] rtc: add a dynamic property for retrieving the date, Anthony Liguori, 2011/11/30
- Re: [Qemu-devel] [PATCH 00/18] qom: dynamic properties and composition tree, Anthony Liguori, 2011/11/30