aboutsummaryrefslogtreecommitdiff
path: root/scripts/render_block_graph.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2022-01-10 18:28:59 -0500
committerJohn Snow <jsnow@redhat.com>2022-01-21 16:01:31 -0500
commit05908602429cf9d6fce9b60704b8395f6d295441 (patch)
tree295ec2800a9340195c95f52c94520aa479f89ce0 /scripts/render_block_graph.py
parent0665410dcf3d3fa8758545668998dd16d3abbaa9 (diff)
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>
Diffstat (limited to 'scripts/render_block_graph.py')
-rwxr-xr-xscripts/render_block_graph.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py
index 42288a3cfb..b33fb70d5e 100755
--- a/scripts/render_block_graph.py
+++ b/scripts/render_block_graph.py
@@ -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']