python/qemu/machine: add method to retrieve QEMUMachine::binary field

Add a supportive property to access the path to the QEMU binary

Signed-off-by: Maksim Davydov <davydov-max@yandex-team.ru>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240318213550.155573-4-davydov-max@yandex-team.ru>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
master
Maksim Davydov 2024-03-19 00:35:49 +03:00 committed by Philippe Mathieu-Daudé
parent 236e9397b3
commit 33956e4768
1 changed files with 5 additions and 0 deletions

View File

@ -328,6 +328,11 @@ class QEMUMachine:
"""Returns the list of arguments given to the QEMU binary."""
return self._args
@property
def binary(self) -> str:
"""Returns path to the QEMU binary"""
return self._binary
def _pre_launch(self) -> None:
if self._qmp_set:
if self._monitor_address is None: