From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7471DC433EF for ; Thu, 16 Dec 2021 22:21:06 +0000 (UTC) Received: from localhost ([::1]:34252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxz7Z-00008p-Gu for qemu-devel@archiver.kernel.org; Thu, 16 Dec 2021 17:21:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxxgK-0004xP-LU for qemu-devel@nongnu.org; Thu, 16 Dec 2021 15:48:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:23219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxxg6-0003W7-TV for qemu-devel@nongnu.org; Thu, 16 Dec 2021 15:48:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639687717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RHxII5qHkUudrOo9Ahfn94N8JIBUTIXfSG58ReBE3RQ=; b=JE2sgNrdRJCPaPWY4JaZJ4A8Et358c/B9XgySZWIBcmOl5LlQStf7GSV8lNiN9ETf3j7I4 k/OO6ARRxXE95oD5fvPAQ229bZcpAoK5Huq0E51xsFsWty6MGlzSHrIFDXdIpLjGsKMXYj uKPdcMz0Qa+SYqOpLK4Qofp+qhAJFyM= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-223-Cz7B3GvYPbqqz2JL7MnDKA-1; Thu, 16 Dec 2021 15:48:36 -0500 X-MC-Unique: Cz7B3GvYPbqqz2JL7MnDKA-1 Received: by mail-ua1-f70.google.com with SMTP id t22-20020ab02696000000b002e970ec14a3so124071uao.19 for ; Thu, 16 Dec 2021 12:48:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RHxII5qHkUudrOo9Ahfn94N8JIBUTIXfSG58ReBE3RQ=; b=cr2Ntt8/9ogdhKkbvsdrrWz5fL+ibgz6qbXrA3DYHh3N271E3IL4bFVoInQNt0vdOY u0SkqH8N2VS1RoA90hVWpLvuIghNmPKbSUtiAdGNbA3g3VUyojxixexMQdvUnnk8+VUw vHoo1UHECTutFF0bwJlp5a6aLQLi7UxiNVAd4RUcD1L97r4gbjBltHrgjb+Nasm4WrJ1 rlrbGrV+ATEh22UnZKiVBtJEIjgpnTnBij0iMIrUiJkpl9cH6dDJItCH2y4tEoae3Fod b9I/5higavkGGzwgZSpitnSrTJWkERFZ1Kx6QoyWTgPljFQ9MIYa2HvOGt/RLXTPZAID 3vWw== X-Gm-Message-State: AOAM532HBNXmWrdyd/vpInLJEY8NaU8aph12Zy5jqklVsFSYuUnK7mUb lRdzOhYJsgkatpxtCSNZI/C5txHzU9LTdLWrLUMN8JSa42j/+bHISQQk/WtZ7kBB9oxIBcGaGX/ JDRExueqTToP17fSWl3RroK0X+HVv9TA= X-Received: by 2002:a1f:a4c5:: with SMTP id n188mr7350893vke.35.1639687715996; Thu, 16 Dec 2021 12:48:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLDA9BK4iORkTyxvPk5BU/e/AVHf33INAH2kqcAJ8Lb1izHaJjL3R0EbWOLW0q2tp2pCvtQYyus9Lrava/ABw= X-Received: by 2002:a1f:a4c5:: with SMTP id n188mr7350883vke.35.1639687715816; Thu, 16 Dec 2021 12:48:35 -0800 (PST) MIME-Version: 1.0 References: <20211215193939.3768033-1-jsnow@redhat.com> <20211215193939.3768033-16-jsnow@redhat.com> In-Reply-To: From: John Snow Date: Thu, 16 Dec 2021 15:48:24 -0500 Message-ID: Subject: Re: [PATCH v2 15/25] scripts/render-block-graph: switch to AQMP To: Vladimir Sementsov-Ogievskiy Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000d8185605d3498b9a" Received-SPF: pass client-ip=170.10.129.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.718, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Kevin Wolf , Daniel Berrange , Beraldo Leal , Qemu-block , Markus Armbruster , qemu-devel , Wainer Moschetta , Andrea Bolognani , Hanna Reitz , Gerd Hoffmann , Cleber Rosa Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000d8185605d3498b9a Content-Type: text/plain; charset="UTF-8" On Thu, Dec 16, 2021 at 5:58 AM Vladimir Sementsov-Ogievskiy < vsementsov@virtuozzo.com> wrote: > 15.12.2021 22:39, John Snow wrote: > > Creating an instance of qemu.aqmp.ExecuteError is too involved here, so > > just drop the specificity down to a generic AQMPError. > > s/AQMPError/QMPError/ ? > > The problem with relying on linters to achieve consistency is that they don't lint your commit messages :) Fixed, thank you. > > > > Signed-off-by: John Snow > > > Reviewed-by: Vladimir Sementsov-Ogievskiy > > > --- > > 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'] > > > > > > > -- > Best regards, > Vladimir > > --000000000000d8185605d3498b9a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Dec 16, 2021 at 5:58 AM Vladi= mir Sementsov-Ogievskiy <vse= mentsov@virtuozzo.com> wrote:
15.12.2021 22:39, John Snow wrote:
> Creating an instance of qemu.aqmp.ExecuteError is too involved here, s= o
> just drop the specificity down to a generic AQMPError.

s/AQMPError/QMPError/=C2=A0 ?


The problem with relying on linters to= achieve consistency is that they don't lint your commit messages :)

Fixed, thank you.
=C2=A0
>
> Signed-off-by: John Snow <jsnow@redhat.com>


Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

> ---
>=C2=A0 =C2=A0scripts/render_block_graph.py | 8 +++-----
>=C2=A0 =C2=A01 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/render_block_graph.py b/scripts/render_block_grap= h.py
> index da6acf050d..97778927f3 100755
> --- a/scripts/render_block_graph.py
> +++ b/scripts/render_block_graph.py
> @@ -25,10 +25,8 @@
>=C2=A0 =C2=A0from graphviz import Digraph
>=C2=A0 =C2=A0
>=C2=A0 =C2=A0sys.path.append(os.path.join(os.path.dirname(__file__), &#= 39;..', 'python'))
> -from qemu.qmp import (
> -=C2=A0 =C2=A0 QEMUMonitorProtocol,
> -=C2=A0 =C2=A0 QMPResponseError,
> -)
> +from qemu.aqmp import QMPError
> +from qemu.aqmp.legacy import QEMUMonitorProtocol
>=C2=A0 =C2=A0
>=C2=A0 =C2=A0
>=C2=A0 =C2=A0def perm(arr):
> @@ -105,7 +103,7 @@ def command(self, cmd):
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0reply =3D json.loads(subproces= s.check_output(ar))
>=C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if 'error' in reply: > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 raise QMPResponseError(repl= y)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 raise QMPError(reply)
>=C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return reply['return']=
>=C2=A0 =C2=A0
>


--
Best regards,
Vladimir

--000000000000d8185605d3498b9a--