python/qemu/machine: add method to retrieve QEMUMachine::binary field
authorMaksim Davydov <davydov-max@yandex-team.ru>
Mon, 18 Mar 2024 21:35:49 +0000 (00:35 +0300)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 25 Apr 2024 08:12:43 +0000 (10:12 +0200)
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>
python/qemu/machine/machine.py

index 31cb9d617d2925d2a2b51571efb96b0b6e478981..f648f6af451bdf197e03b00ad016f7b532f5ec98 100644 (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: