Expose the greeting as a read-only property of QMPClient so it can be retrieved at-will.
Signed-off-by: John Snow <js...@redhat.com> Reviewed-by: Hanna Reitz <hre...@redhat.com> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Message-id: 20210923004938.3999963-2-js...@redhat.com Signed-off-by: John Snow <js...@redhat.com> --- python/qemu/aqmp/qmp_client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py index 82e9dab124c..d2ad7459f9f 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: """ -- 2.31.1