Move console watcher stop try up

Could cause an exception if d_domain is not defined yet.
This commit is contained in:
Joshua Boniface 2021-09-22 16:02:04 -04:00
parent 772807deb3
commit df277edf1c
1 changed files with 6 additions and 6 deletions

View File

@ -217,10 +217,10 @@ def entrypoint():
# Stop console logging on all VMs # Stop console logging on all VMs
logger.out('Stopping domain console watchers', state='s') logger.out('Stopping domain console watchers', state='s')
try:
if d_domain is not None: if d_domain is not None:
for domain in d_domain: for domain in d_domain:
if d_domain[domain].getnode() == config['node_hostname']: if d_domain[domain].getnode() == config['node_hostname']:
try:
d_domain[domain].console_log_instance.stop() d_domain[domain].console_log_instance.stop()
except Exception: except Exception:
pass pass