Skip to content

Commit 0590860

Browse files
committed
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 <[email protected]> Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]> Reviewed-by: Beraldo Leal <[email protected]>
1 parent 0665410 commit 0590860

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/render_block_graph.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525
from graphviz import Digraph
2626

2727
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
3230

3331

3432
def perm(arr):
@@ -104,7 +102,7 @@ def command(self, cmd):
104102
reply = json.loads(subprocess.check_output(ar))
105103

106104
if 'error' in reply:
107-
raise QMPResponseError(reply)
105+
raise QMPError(reply)
108106

109107
return reply['return']
110108

0 commit comments

Comments
 (0)