From 292b701ca8a334f759063573f7413c75fff26274 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 18 May 2022 13:56:59 +0200 Subject: [PATCH] Unbound: do not compare identity when checking exit code --- src/opnsense/scripts/unbound/wrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opnsense/scripts/unbound/wrapper.py b/src/opnsense/scripts/unbound/wrapper.py index c59da43c7..b2e48da6c 100755 --- a/src/opnsense/scripts/unbound/wrapper.py +++ b/src/opnsense/scripts/unbound/wrapper.py @@ -90,12 +90,12 @@ if args.dnsbl: removals = {line.split(' ')[0].strip() for line in removals} uc = unbound_control_do('local_datas_remove', removals) syslog.syslog(syslog.LOG_NOTICE, 'unbound-control returned: %s' % uc[0]) - if uc[1] is not 0: + if uc[1] != 0: sys.exit(1) if additions: uc = unbound_control_do('local_datas', additions) syslog.syslog(syslog.LOG_NOTICE, 'unbound-control returned: %s' % uc[0]) - if uc[1] is not 0: + if uc[1] != 0: sys.exit(1) output = {'additions': len(additions), 'removals': len(removals)}