From 227e1f8c752f7f2d345fc4901e4f6f85c5f3d63a Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sun, 14 Jan 2024 13:06:47 -0700 Subject: [PATCH] fix exception --- check_nut.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/check_nut.py b/check_nut.py index db2248a..442f93b 100644 --- a/check_nut.py +++ b/check_nut.py @@ -112,8 +112,7 @@ def main(args): print_icinga2_check_status(f'Failed to get UPS status: data stale', nagios.STATE_CRIT) sys.exit(nagios.STATE_CRIT) else: - print_icinga2_check_status(f'Failed to get UPS status: {output}', nagios.STATE_UNKNOWN) - print_icinga2_check_status(f'Failed to get UPS status: {e}', nagios.STATE_UNKNOWN) + print_icinga2_check_status(f'Failed to get UPS status: {e}', nagios.STATE_UNKNOWN) sys.exit(nagios.STATE_UNKNOWN) # Remove unwanted stats.