diff options
author | John Snow <jsnow@redhat.com> | 2020-07-10 01:22:07 -0400 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-07-14 22:22:22 +0200 |
commit | e3a23b4803a3939c7e24e8946880f5ef369ef781 (patch) | |
tree | 8bb2ed6d555453586ef513915dc210f132f2cd1a /scripts | |
parent | 2012453ddde0506d044d4739257227c6868028b6 (diff) | |
download | qemu-e3a23b4803a3939c7e24e8946880f5ef369ef781.zip qemu-e3a23b4803a3939c7e24e8946880f5ef369ef781.tar.gz qemu-e3a23b4803a3939c7e24e8946880f5ef369ef781.tar.bz2 |
python/qmp.py: re-absorb MonitorResponseError
When I initially split this out, I considered this more of a machine
error than a QMP protocol error, but I think that's misguided.
Move this back to qmp.py and name it QMPResponseError. Convert
qmp.command() to use this exception type.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200710052220.3306-4-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/render_block_graph.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py index 409b432..da6acf0 100755 --- a/scripts/render_block_graph.py +++ b/scripts/render_block_graph.py @@ -25,7 +25,10 @@ import json from graphviz import Digraph sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) -from qemu.machine import MonitorResponseError +from qemu.qmp import ( + QEMUMonitorProtocol, + QMPResponseError, +) def perm(arr): @@ -102,7 +105,7 @@ class LibvirtGuest(): reply = json.loads(subprocess.check_output(ar)) if 'error' in reply: - raise MonitorResponseError(reply) + raise QMPResponseError(reply) return reply['return'] |