On 10/7/20 5:53 AM, Kevin Wolf wrote:
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 <js...@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 <kw...@redhat.com>


Oh, yes. That's what happened here -- and it got folded in here specifically to make that access check consistent.

I'll update the commit message.


Reply via email to