From bc6395c959ff263c0e71db34ac23e5be4bef646e Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 29 Aug 2021 03:52:18 -0400 Subject: [PATCH] Don't crash cleanup if no this_node --- node-daemon/pvcnoded/Daemon.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/node-daemon/pvcnoded/Daemon.py b/node-daemon/pvcnoded/Daemon.py index fbd4d8c4..53d1dcca 100644 --- a/node-daemon/pvcnoded/Daemon.py +++ b/node-daemon/pvcnoded/Daemon.py @@ -207,9 +207,13 @@ def entrypoint(): # Waiting for any flushes to complete logger.out('Waiting for any active flushes', state='s') - if this_node is not None: - while this_node.flush_thread is not None: - sleep(0.5) + try: + if this_node is not None: + while this_node.flush_thread is not None: + sleep(0.5) + except Exception: + # We really don't care here, just proceed + pass # Stop console logging on all VMs logger.out('Stopping domain console watchers', state='s')