Restore some try functionalirty here

This commit is contained in:
Joshua Boniface 2018-06-04 01:26:23 -04:00
parent 79b5c41abd
commit 0ec1399424
1 changed files with 8 additions and 2 deletions

View File

@ -106,11 +106,17 @@ class NodeInstance(threading.Thread):
for domain in self.domain_list:
dom = pvcf.lookupByUUID(domain)
if dom == None:
self.domain_list.remove(domain)
try:
self.domain_list.remove(domain)
except:
pass
else:
state = dom.state()[0]
if state != libvirt.VIR_DOMAIN_RUNNING:
self.domain_list.remove(domain)
try:
self.domain_list.remove(domain)
except:
pass
# Set our information in zookeeper
self.memfree = conn.getFreeMemory()