From ccbf668bea9c840d2f402a52a9cf65cdf69319fc Mon Sep 17 00:00:00 2001 From: Tony Fernandez Date: Thu, 24 Oct 2024 09:01:10 -0400 Subject: [PATCH] fix for if logic --- borgmatic/hooks/zabbix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/borgmatic/hooks/zabbix.py b/borgmatic/hooks/zabbix.py index 743376ce..ef16633a 100644 --- a/borgmatic/hooks/zabbix.py +++ b/borgmatic/hooks/zabbix.py @@ -58,7 +58,7 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev "id": 1, } - elif host and key is not None: + elif (host and key) is not None: logger.info(f'{config_filename}: Updating Host:{host} and Key:{key} on Zabbix') data = { "jsonrpc": "2.0", @@ -80,7 +80,7 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev logger.info(f'{config_filename}: Using API key auth for Zabbix') headers['Authorization'] = 'Bearer ' + api_key - elif username and password is not None: + elif (username and password) is not None: logger.info(f'{config_filename}: Using user/pass auth with user {username} for Zabbix') if not dry_run: response = requests.post(