瀏覽代碼

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>
Maksim Davydov 1 年之前
父節點
當前提交
33956e4768
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      python/qemu/machine/machine.py

+ 5 - 0
python/qemu/machine/machine.py

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