Revision | 05908602429cf9d6fce9b60704b8395f6d295441 (tree) |
---|---|
Time | 2022-01-22 06:01:31 |
Author | John Snow <jsnow@redh...> |
Commiter | John Snow |
scripts/render-block-graph: switch to AQMP
Creating an instance of qemu.aqmp.ExecuteError is too involved here, so
just drop the specificity down to a generic QMPError.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
@@ -25,10 +25,8 @@ import json | ||
25 | 25 | from graphviz import Digraph |
26 | 26 | |
27 | 27 | sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) |
28 | -from qemu.qmp import ( | |
29 | - QEMUMonitorProtocol, | |
30 | - QMPResponseError, | |
31 | -) | |
28 | +from qemu.aqmp import QMPError | |
29 | +from qemu.aqmp.legacy import QEMUMonitorProtocol | |
32 | 30 | |
33 | 31 | |
34 | 32 | def perm(arr): |
@@ -104,7 +102,7 @@ class LibvirtGuest(): | ||
104 | 102 | reply = json.loads(subprocess.check_output(ar)) |
105 | 103 | |
106 | 104 | if 'error' in reply: |
107 | - raise QMPResponseError(reply) | |
105 | + raise QMPError(reply) | |
108 | 106 | |
109 | 107 | return reply['return'] |
110 | 108 |