]> Git Repo - qemu.git/commitdiff
qemu.py: cleanup redundant calls in launch()
authorAmador Pahim <[email protected]>
Mon, 22 Jan 2018 20:50:32 +0000 (21:50 +0100)
committerEduardo Habkost <[email protected]>
Mon, 5 Feb 2018 21:53:55 +0000 (19:53 -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().

Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Signed-off-by: Amador Pahim <[email protected]>
Message-Id: <20180122205033[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
scripts/qemu.py

index dcb4f0ffe6461f8bee49c6d29f0c839e00d633c5..09db6249a33c80667f0af1eff58fcc3478466271 100644 (file)
@@ -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:
This page took 0.026473 seconds and 4 git commands to generate.