Commit c58b535f authored by Amador Pahim's avatar Amador Pahim Committed by Eduardo Habkost
Browse files

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: default avatarFam Zheng <famz@redhat.com>
Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: default avatarAmador Pahim <apahim@redhat.com>
Message-Id: <20180122205033.24893-6-apahim@redhat.com>
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
parent 17589cae
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -215,11 +215,7 @@ class QEMUMachine(object):
        try:
        try:
            self._launch()
            self._launch()
        except:
        except:
            if self.is_running():
            self.shutdown()
                self._popen.kill()
                self._popen.wait()
            self._load_io_log()
            self._post_shutdown()


            LOG.debug('Error launching VM')
            LOG.debug('Error launching VM')
            if self._qemu_full_args:
            if self._qemu_full_args: