Message ID | 20210917054047.2042843-2-jsnow@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Switch iotests to using Async QMP | expand |
On 17.09.21 07:40, John Snow wrote: > Expose the greeting as a read-only property of QMPClient so it can be > retrieved at-will. > > Signed-off-by: John Snow <jsnow@redhat.com> > --- > python/qemu/aqmp/qmp_client.py | 5 +++++ > 1 file changed, 5 insertions(+) Reviewed-by: Hanna Reitz <hreitz@redhat.com>
diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py index 82e9dab124..d2ad7459f9 100644 --- a/python/qemu/aqmp/qmp_client.py +++ b/python/qemu/aqmp/qmp_client.py @@ -224,6 +224,11 @@ def __init__(self, name: Optional[str] = None) -> None: 'asyncio.Queue[QMPClient._PendingT]' ] = {} + @property + def greeting(self) -> Optional[Greeting]: + """The `Greeting` from the QMP server, if any.""" + return self._greeting + @upper_half async def _establish_session(self) -> None: """
Expose the greeting as a read-only property of QMPClient so it can be retrieved at-will. Signed-off-by: John Snow <jsnow@redhat.com> --- python/qemu/aqmp/qmp_client.py | 5 +++++ 1 file changed, 5 insertions(+)