[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 05/11] qemu.py: cleanup redundant calls in launch
From: |
Amador Pahim |
Subject: |
[Qemu-devel] [PATCH v7 05/11] qemu.py: cleanup redundant calls in launch() |
Date: |
Fri, 18 Aug 2017 19:05:20 +0200 |
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 <address@hidden>
---
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
- Re: [Qemu-devel] [PATCH v7 07/11] qemu.py: include debug information on launch error, (continued)
[Qemu-devel] [PATCH v7 05/11] qemu.py: cleanup redundant calls in launch(),
Amador Pahim <=
[Qemu-devel] [PATCH v7 04/11] qemu.py: use poll() instead of 'returncode', Amador Pahim, 2017/08/18
[Qemu-devel] [PATCH v7 11/11] qemu.py: refactor launch(), Amador Pahim, 2017/08/18
[Qemu-devel] [PATCH v7 08/11] qemu.py: make sure we only remove files we create, Amador Pahim, 2017/08/18
[Qemu-devel] [PATCH v7 09/11] qemu.py: launch vm only if it's not running, Amador Pahim, 2017/08/18
[Qemu-devel] [PATCH v7 01/11] qemu.py: fix is_running() return before first launch(), Amador Pahim, 2017/08/18
[Qemu-devel] [PATCH v7 03/11] qemu.py: use os.path.null instead of /dev/null, Amador Pahim, 2017/08/18
Re: [Qemu-devel] [PATCH v7 00/11] scripts/qemu.py fixes and cleanups, Eduardo Habkost, 2017/08/31