From 0ec1399424509052581afe8d99f5379e6215da7a Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 4 Jun 2018 01:26:23 -0400 Subject: [PATCH] Restore some try functionalirty here --- NodeInstance.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/NodeInstance.py b/NodeInstance.py index fdfff40f..1a8d79ee 100644 --- a/NodeInstance.py +++ b/NodeInstance.py @@ -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()