[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/20] python/machine.py: Add _qmp access shim
From: |
Kevin Wolf |
Subject: |
Re: [PATCH 07/20] python/machine.py: Add _qmp access shim |
Date: |
Wed, 7 Oct 2020 11:53:22 +0200 |
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Like many other Optional[] types, it's not always a given that this
> object will be set. Wrap it in a type-shim that raises a meaningful
> error and will always return a concrete type.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> @@ -515,11 +515,13 @@ def set_qmp_monitor(self, enabled=True):
> line. Default is True.
> @note: call this function before launch().
> """
> - if enabled:
> - self._qmp_set = True
> - else:
> - self._qmp_set = False
> - self._qmp = None
> + self._qmp_set = enabled
This change seems unrelated to wrapping the connection in a property.
Intuitively, it makes sense that the connection of a running instance
doesn't go away just because I disable QMP in the command line for the
next launch.
If this is the reasoning behind the change, maybe mention it in the
commit message.
With this:
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
- [PATCH 03/20] python/machine.py: reorder __init__, (continued)
- [PATCH 03/20] python/machine.py: reorder __init__, John Snow, 2020/10/06
- [PATCH 02/20] python/machine.py: Fix monitor address typing, John Snow, 2020/10/06
- [PATCH 04/20] python/machine.py: Don't modify state in _base_args(), John Snow, 2020/10/06
- [PATCH 05/20] python/machine.py: Handle None events in events_wait, John Snow, 2020/10/06
- [PATCH 06/20] python/machine.py: use qmp.command, John Snow, 2020/10/06
- [PATCH 07/20] python/machine.py: Add _qmp access shim, John Snow, 2020/10/06
- Re: [PATCH 07/20] python/machine.py: Add _qmp access shim,
Kevin Wolf <=
- [PATCH 08/20] python/machine.py: fix _popen access, John Snow, 2020/10/06
[PATCH 09/20] python/qemu: make 'args' style arguments immutable, John Snow, 2020/10/06
[PATCH 10/20] iotests.py: Adjust HMP kwargs typing, John Snow, 2020/10/06
[PATCH 11/20] python/qemu: Add mypy type annotations, John Snow, 2020/10/06