Properly properly handle issue

This commit is contained in:
Joshua Boniface 2020-08-16 11:38:39 -04:00
parent 0a01d84290
commit 65add58c9a
1 changed files with 5 additions and 2 deletions

View File

@ -1346,8 +1346,11 @@ def collect_vm_stats(queue):
domain_memory_stats = domain.memoryStats() domain_memory_stats = domain.memoryStats()
domain_cpu_stats = domain.getCPUStats(True)[0] domain_cpu_stats = domain.getCPUStats(True)[0]
except Exception as e: except Exception as e:
if debug and domain is defined: if debug:
print("Failed getting VM information for {}: {}".format(domain.name(), e)) try:
print("Failed getting VM information for {}: {}".format(domain.name(), e))
except:
pass
continue continue
# Ensure VM is present in the domain_list # Ensure VM is present in the domain_list