Message ID | 8926805f0283b8aca7d709ae06b1103db857cbde.1742315602.git.pkrempa@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | scripts: render_block_graph: Fix with new python and improve argument parsing | expand |
diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py index 7a6738410c..e2bb83b60e 100755 --- a/scripts/render_block_graph.py +++ b/scripts/render_block_graph.py @@ -106,7 +106,10 @@ def cmd(self, cmd): ar += ['qemu-monitor-command', self.name, json.dumps(m)] - reply = json.loads(subprocess.check_output(ar)) + try: + reply = json.loads(subprocess.check_output(ar)) + except subprocess.CalledProcessError: + sys.exit(1) if 'error' in reply: raise QMPError(reply)