From 65add58c9a044055af46bedfc074c5c49c90c1a8 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 16 Aug 2020 11:38:39 -0400 Subject: [PATCH] Properly properly handle issue --- node-daemon/pvcnoded/Daemon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/node-daemon/pvcnoded/Daemon.py b/node-daemon/pvcnoded/Daemon.py index 4ef5f7cb..27bd49cf 100644 --- a/node-daemon/pvcnoded/Daemon.py +++ b/node-daemon/pvcnoded/Daemon.py @@ -1346,8 +1346,11 @@ def collect_vm_stats(queue): domain_memory_stats = domain.memoryStats() domain_cpu_stats = domain.getCPUStats(True)[0] except Exception as e: - if debug and domain is defined: - print("Failed getting VM information for {}: {}".format(domain.name(), e)) + if debug: + try: + print("Failed getting VM information for {}: {}".format(domain.name(), e)) + except: + pass continue # Ensure VM is present in the domain_list