diff options
author | Amador Pahim <apahim@redhat.com> | 2018-01-22 21:50:32 +0100 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-02-05 19:53:55 -0200 |
commit | c58b535f8396f7ab71dc7074713c99ec042da95b (patch) | |
tree | 61c9d1e271d657f1908c8e7dd6e9618249800aef /scripts/qemu.py | |
parent | 17589cae908222d572953d4c85f72aa833e87d58 (diff) |
qemu.py: cleanup redundant calls in launch()
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().
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Amador Pahim <apahim@redhat.com>
Message-Id: <20180122205033.24893-6-apahim@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'scripts/qemu.py')
-rw-r--r-- | scripts/qemu.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/qemu.py b/scripts/qemu.py index dcb4f0ffe6..09db6249a3 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -215,11 +215,7 @@ class QEMUMachine(object): try: self._launch() except: - if self.is_running(): - self._popen.kill() - self._popen.wait() - self._load_io_log() - self._post_shutdown() + self.shutdown() LOG.debug('Error launching VM') if self._qemu_full_args: |