From f3077e2a4bdac60a829ddaee4061f20ccf2019dc Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 9 Dec 2019 09:23:51 +1000 Subject: Clean up the counting of errors and warnings. --- apt-panopticon-report-email-web.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apt-panopticon-report-email-web.lua') diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 36e1ca6..1144550 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua @@ -174,14 +174,12 @@ local status = function(host, results, typ) if nil ~= results[typ] then e = results[typ].errors w = results[typ].warnings ---[[ for k, v in pairs(results[typ]) do if "table" == type(v) then if 0 <= v.errors then e = e + v.errors else to = true end if 0 <= v.warnings then w = w + v.warnings else to = true end end end -]] else for k, v in pairs(results) do if "table" == type(v) then @@ -251,9 +249,9 @@ local collate = function(host, ip, results) for i, u in pairs(v) do if "table" == type(u) then for h, t in pairs(u) do - local a = results[k][h] + local a = results[k][i][h] if nil == a then a = 0 end - results[k][h] = a + t + results[k][i][h] = a + t end else local a = results[k][i] -- cgit v1.1