Missing return if failed to start

This commit is contained in:
Joshua Boniface 2018-06-10 20:52:53 -04:00
parent 0a882ef693
commit 974c708c82
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ class VMInstance:
except libvirt.libvirtError as e:
ansiiprint.echo('Failed to create VM', '{}:'.format(self.domuuid), 'e')
self.zk.set('/domains/{}/state'.format(self.domuuid), 'stop'.encode('ascii'))
return
if not self.domuuid in self.thishypervisor.domain_list:
self.thishypervisor.domain_list.append(self.domuuid)