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, 23 Sep 2019 15:50:49 +0000 (16:50 +0100)
commit6cfee64bff087a07aa436c9d7d8f531f4715b5c7
treedf4e11a4410caecb1691c742b08b01eb781cac73
parentc095cbcc78f08c78bc8a05eb30b42b7fa008f9bc
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