mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-14 23:13:30 +00:00
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>
This commit is contained in:
parent
0665410dcf
commit
0590860242
|
@ -25,10 +25,8 @@
|
|||
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 @@ def command(self, cmd):
|
|||
reply = json.loads(subprocess.check_output(ar))
|
||||
|
||||
if 'error' in reply:
|
||||
raise QMPResponseError(reply)
|
||||
raise QMPError(reply)
|
||||
|
||||
return reply['return']
|
||||
|
||||
|
|
Loading…
Reference in a new issue