We are opening the _qemu_log_path during the launch() but we are forgetting to close it.
This patch makes sure we will close the self._qemu_log_path during the cleanup (post_shutdown()). Signed-off-by: Amador Pahim <apa...@redhat.com> --- scripts/qemu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index c26e1412f9..1b77fec48b 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -153,6 +153,9 @@ class QEMUMachine(object): self._qmp.accept() def _post_shutdown(self): + if self._qemu_log_fd is not None: + self._qemu_log_fd.close() + while self._created_files: self._remove_if_exists(self._created_files.pop()) -- 2.13.5