• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision05908602429cf9d6fce9b60704b8395f6d295441 (tree)
Time2022-01-22 06:01:31
AuthorJohn Snow <jsnow@redh...>
CommiterJohn Snow

Log Message

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>

Change Summary

Incremental Difference

--- a/scripts/render_block_graph.py
+++ b/scripts/render_block_graph.py
@@ -25,10 +25,8 @@ import json
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 @@ class LibvirtGuest():
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