Unbound: do not compare identity when checking exit code

This commit is contained in:
Stephan 2022-05-18 13:56:59 +02:00
parent c5212719c9
commit 292b701ca8

View File

@ -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)}