diff options
author | John Snow <jsnow@redhat.com> | 2021-09-22 20:49:22 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2021-10-12 12:22:10 -0400 |
commit | 0257209a09793bfaf1b662faad5558e7011e748a (patch) | |
tree | c0ab65882c520f4b1a18347e56526db0024a9844 /python/qemu | |
parent | bfd9a76f9c143d450ab5545dedfa74364b39fc56 (diff) | |
download | qemu-0257209a09793bfaf1b662faad5558e7011e748a.zip qemu-0257209a09793bfaf1b662faad5558e7011e748a.tar.gz qemu-0257209a09793bfaf1b662faad5558e7011e748a.tar.bz2 |
python/aqmp: add greeting property to QMPClient
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>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20210923004938.3999963-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/qemu')
-rw-r--r-- | python/qemu/aqmp/qmp_client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/qemu/aqmp/qmp_client.py b/python/qemu/aqmp/qmp_client.py index 82e9dab..d2ad745 100644 --- a/python/qemu/aqmp/qmp_client.py +++ b/python/qemu/aqmp/qmp_client.py @@ -224,6 +224,11 @@ class QMPClient(AsyncProtocol[Message], Events): '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: """ |