[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 15/25] scripts/render-block-graph: switch to AQMP
From: |
Beraldo Leal |
Subject: |
Re: [PATCH v2 15/25] scripts/render-block-graph: switch to AQMP |
Date: |
Thu, 16 Dec 2021 10:47:43 -0300 |
On Wed, Dec 15, 2021 at 02:39:29PM -0500, John Snow wrote:
> Creating an instance of qemu.aqmp.ExecuteError is too involved here, so
> just drop the specificity down to a generic AQMPError.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> scripts/render_block_graph.py | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py
> index da6acf050d..97778927f3 100755
> --- a/scripts/render_block_graph.py
> +++ b/scripts/render_block_graph.py
> @@ -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):
> @@ -105,7 +103,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']
Reviewed-by: Beraldo Leal <bleal@redhat.com>
--
Beraldo
- [PATCH v2 13/25] scripts/cpu-x86-uarch-abi: fix CLI parsing, (continued)
- [PATCH v2 13/25] scripts/cpu-x86-uarch-abi: fix CLI parsing, John Snow, 2021/12/15
- [PATCH v2 14/25] scripts/cpu-x86-uarch-abi: switch to AQMP, John Snow, 2021/12/15
- [PATCH v2 15/25] scripts/render-block-graph: switch to AQMP, John Snow, 2021/12/15
- [PATCH v2 16/25] scripts/bench-block-job: switch to AQMP, John Snow, 2021/12/15
- [PATCH v2 17/25] iotests/mirror-top-perms: switch to AQMP, John Snow, 2021/12/15
- [PATCH v2 18/25] iotests: switch to AQMP, John Snow, 2021/12/15
- [PATCH v2 19/25] python: temporarily silence pylint duplicate-code warnings, John Snow, 2021/12/15