From df277edf1cd508ec644360f372ba37f9640a57f2 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 22 Sep 2021 16:02:04 -0400 Subject: [PATCH] Move console watcher stop try up Could cause an exception if d_domain is not defined yet. --- node-daemon/pvcnoded/Daemon.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/node-daemon/pvcnoded/Daemon.py b/node-daemon/pvcnoded/Daemon.py index 68fd0048..605c5606 100644 --- a/node-daemon/pvcnoded/Daemon.py +++ b/node-daemon/pvcnoded/Daemon.py @@ -217,13 +217,13 @@ def entrypoint(): # Stop console logging on all VMs logger.out('Stopping domain console watchers', state='s') - if d_domain is not None: - for domain in d_domain: - if d_domain[domain].getnode() == config['node_hostname']: - try: + try: + if d_domain is not None: + for domain in d_domain: + if d_domain[domain].getnode() == config['node_hostname']: d_domain[domain].console_log_instance.stop() - except Exception: - pass + except Exception: + pass # Force into secondary coordinator state if needed try: