]> Git Repo - qemu.git/commitdiff
scripts/render-block-graph: switch to AQMP
authorJohn Snow <[email protected]>
Mon, 10 Jan 2022 23:28:59 +0000 (18:28 -0500)
committerJohn Snow <[email protected]>
Fri, 21 Jan 2022 21:01:31 +0000 (16:01 -0500)
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 <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Beraldo Leal <[email protected]>
scripts/render_block_graph.py

index 42288a3cfbe486b77fdb9d0778f652efa7079097..b33fb70d5ee9e278d380e416a362a8f504d50636 100755 (executable)
@@ -25,10 +25,8 @@ import json
 from graphviz import Digraph
 
 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python'))
-from qemu.qmp import (
-    QEMUMonitorProtocol,
-    QMPResponseError,
-)
+from qemu.aqmp import QMPError
+from qemu.aqmp.legacy import QEMUMonitorProtocol
 
 
 def perm(arr):
@@ -104,7 +102,7 @@ class LibvirtGuest():
         reply = json.loads(subprocess.check_output(ar))
 
         if 'error' in reply:
-            raise QMPResponseError(reply)
+            raise QMPError(reply)
 
         return reply['return']
 
This page took 0.026039 seconds and 4 git commands to generate.