Now that shutdown() is guaranteed to always execute self._load_io_log() and self._post_shutdown(), their calls in 'except' became redundant and we can safely replace it by a call to shutdown().
Signed-off-by: Amador Pahim <apa...@redhat.com> --- scripts/qemu.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index 774f971f69..902d4c6c78 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -155,11 +155,7 @@ class QEMUMachine(object): stderr=subprocess.STDOUT, shell=False) self._post_launch() except: - if self.is_running(): - self._popen.kill() - self._popen.wait() - self._load_io_log() - self._post_shutdown() + self.shutdown() raise def shutdown(self): -- 2.13.5