From bf6ed289e1e229a64f176b0575e2e4a198c40bf4 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 9 Sep 2023 14:24:34 +0200 Subject: [PATCH] bundles/icinga2: fix stupid in check_spam_blocklist --- bundles/icinga2/files/check_spam_blocklist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/icinga2/files/check_spam_blocklist b/bundles/icinga2/files/check_spam_blocklist index d6a2d31..2986d66 100644 --- a/bundles/icinga2/files/check_spam_blocklist +++ b/bundles/icinga2/files/check_spam_blocklist @@ -50,7 +50,7 @@ def check_list(ip_list, blocklist, warn_ips): dns_name ]).decode().splitlines() for item in result: - if line.startswith(';;'): + if item.startswith(';;'): msgs.append('{} - {}'.format( blocklist, item, @@ -61,7 +61,7 @@ def check_list(ip_list, blocklist, warn_ips): blocklist, item, )) - if (item in warn_ips or line.startswith(';;')) and returncode < 2: + if (item in warn_ips or item.startswith(';;')) and returncode < 2: returncode = 1 else: returncode = 2