Catch another exception
This commit is contained in:
parent
fe52d3815c
commit
b199039453
|
@ -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()
|
||||||
while self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING:
|
try:
|
||||||
time.sleep(0.5)
|
while self.dom.state()[0] == libvirt.VIR_DOMAIN_RUNNING:
|
||||||
|
time.sleep(0.5)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
if self.domuuid in self.thishypervisor.domain_list:
|
if self.domuuid in self.thishypervisor.domain_list:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue