From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <eduardo@habkost.net>,
Peter Maydell <peter.maydell@linaro.org>,
Beraldo Leal <bleal@redhat.com>,
qemu-block@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Hanna Reitz <hreitz@redhat.com>, Cleber Rosa <crosa@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, John Snow <jsnow@redhat.com>
Subject: [PATCH v3 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU
Date: Mon, 24 Jan 2022 13:06:23 -0500 [thread overview]
Message-ID: <20220124180626.627718-2-jsnow@redhat.com> (raw)
In-Reply-To: <20220124180626.627718-1-jsnow@redhat.com>
QEMU versions prior to the "oob" capability *also* can't accept the
"enable" keyword argument at all. Fix the handshake process with older
QEMU versions.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/aqmp/qmp_client.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py
index f1a845cc82..90a8737f03 100644
--- a/python/qemu/aqmp/qmp_client.py
+++ b/python/qemu/aqmp/qmp_client.py
@@ -292,9 +292,9 @@ async def _negotiate(self) -> None:
"""
self.logger.debug("Negotiating capabilities ...")
- arguments: Dict[str, List[str]] = {'enable': []}
+ arguments: Dict[str, List[str]] = {}
if self._greeting and 'oob' in self._greeting.QMP.capabilities:
- arguments['enable'].append('oob')
+ arguments.setdefault('enable', []).append('oob')
msg = self.make_execute_msg('qmp_capabilities', arguments=arguments)
# It's not safe to use execute() here, because the reader/writers
--
2.31.1
next prev parent reply other threads:[~2022-01-24 18:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 18:06 [PATCH v3 0/4] Python: Improvements for iotest 040,041 John Snow
2022-01-24 18:06 ` John Snow [this message]
2022-01-27 14:22 ` [PATCH v3 1/4] python/aqmp: Fix negotiation with pre-"oob" QEMU Hanna Reitz
2022-01-24 18:06 ` [PATCH v3 2/4] python/machine: raise VMLaunchFailure exception from launch() John Snow
2022-01-27 14:22 ` Hanna Reitz
2022-01-31 23:03 ` John Snow
2022-01-24 18:06 ` [PATCH v3 3/4] python: upgrade mypy to 0.780 John Snow
2022-01-24 18:06 ` [PATCH v3 4/4] python/aqmp: add socket bind step to legacy.py John Snow
2022-01-27 15:50 ` Hanna Reitz
2022-01-31 23:10 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220124180626.627718-2-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=eduardo@habkost.net \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).