Restore some try functionalirty here
This commit is contained in:
parent
79b5c41abd
commit
0ec1399424
|
@ -106,11 +106,17 @@ class NodeInstance(threading.Thread):
|
||||||
for domain in self.domain_list:
|
for domain in self.domain_list:
|
||||||
dom = pvcf.lookupByUUID(domain)
|
dom = pvcf.lookupByUUID(domain)
|
||||||
if dom == None:
|
if dom == None:
|
||||||
|
try:
|
||||||
self.domain_list.remove(domain)
|
self.domain_list.remove(domain)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
state = dom.state()[0]
|
state = dom.state()[0]
|
||||||
if state != libvirt.VIR_DOMAIN_RUNNING:
|
if state != libvirt.VIR_DOMAIN_RUNNING:
|
||||||
|
try:
|
||||||
self.domain_list.remove(domain)
|
self.domain_list.remove(domain)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# Set our information in zookeeper
|
# Set our information in zookeeper
|
||||||
self.memfree = conn.getFreeMemory()
|
self.memfree = conn.getFreeMemory()
|
||||||
|
|
Loading…
Reference in New Issue