summary refs log tree commit diff stats
path: root/python/qemu/aqmp/qmp_client.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-02-03 15:42:28 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-02-03 15:42:28 +0000
commit31f59af395922b7f40799e75db6e15ff52d8f94a (patch)
tree3dad1f53308b49c39d898334ff59d3cea58d3855 /python/qemu/aqmp/qmp_client.py
parent8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f (diff)
parentb0b662bb2b340d63529672b5bdae596a6243c4d0 (diff)
downloadfocaccia-qemu-31f59af395922b7f40799e75db6e15ff52d8f94a.tar.gz
focaccia-qemu-31f59af395922b7f40799e75db6e15ff52d8f94a.zip
Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging
Python patches

Peter: I expect this to address the iotest 040,041 failures you observed
on NetBSD. If it doesn't, let me know.

# gpg: Signature made Thu 03 Feb 2022 01:59:32 GMT
# gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jsnow-gitlab/tags/python-pull-request:
  python/aqmp: add socket bind step to legacy.py
  python: upgrade mypy to 0.780
  python/machine: raise VMLaunchFailure exception from launch()
  python/aqmp: Fix negotiation with pre-"oob" QEMU

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'python/qemu/aqmp/qmp_client.py')
-rw-r--r--python/qemu/aqmp/qmp_client.py4
1 files 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 @@ class QMPClient(AsyncProtocol[Message], Events):
         """
         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