qemu-devel
[Top][All Lists]
Advanced

[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>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]