dsa-check-soas: fix error when 0 (or more than 1) records returned
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Mon, 28 Jan 2019 15:05:26 +0000 (15:05 +0000)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Mon, 28 Jan 2019 15:05:26 +0000 (15:05 +0000)
commit3722e31f9385e9a1edad92073167c7122dbcfcb9
tree260ba42db18b27547ac115530e26ff7b385451dc
parent91af3ed547d96b366e9cc672951e959db18c6712
dsa-check-soas: fix error when 0 (or more than 1) records returned

3956f21a moved some processing into resolve_ns. When an unexpected
number of records is returned, an attempt is made to update the
list of warnings, which is not within resolve_ns()'s local scope. The
result is an "undefined local variable" error.

Resolve this by explicitly marking the "warnings" list as in instance
scope. (Although it is not currently a problem, the "OKs" list is also
similarly marked, for future-proofing.)

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
dsa-nagios-checks/checks/dsa-check-soas