Catch another exception

This commit is contained in:
Joshua Boniface 2018-06-02 16:24:11 -04:00
parent fe52d3815c
commit b199039453
1 changed files with 5 additions and 2 deletions

View File

@ -78,8 +78,11 @@ class VMInstance:
def shutdown_vm(self): def shutdown_vm(self):
print(">>> Stopping VM %s" % self.domuuid) print(">>> Stopping VM %s" % self.domuuid)
self.dom.shutdown() self.dom.shutdown()
try:
while self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING: while self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING:
time.sleep(0.5) time.sleep(0.5)
except:
pass
if self.domuuid in self.thishypervisor.domain_list: if self.domuuid in self.thishypervisor.domain_list:
try: try: