Allow the exit code of QEMU to be queried by scripts. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Message-Id: <20170526181200.17227-3-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- scripts/qemu.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/scripts/qemu.py b/scripts/qemu.py index 16934f1e02..880e3e8219 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -88,6 +88,11 @@ class QEMUMachine(object): def is_running(self): return self._popen and (self._popen.returncode is None) + def exitcode(self): + if self._popen is None: + return None + return self._popen.returncode + def get_pid(self): if not self.is_running(): return None -- 2.11.0.259.g40922b1