aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-11-13 20:36:01 +1000
committeronefang2019-11-13 20:36:01 +1000
commit2fa647fb5a2ba60dcc394ce5a223fd14b1c07aac (patch)
treecbd7f9a2258918ef2890134571ae829c0482f820
parentMake the email and web reports similar, reporting the same tests. (diff)
downloadapt-panopticon-2fa647fb5a2ba60dcc394ce5a223fd14b1c07aac.zip
apt-panopticon-2fa647fb5a2ba60dcc394ce5a223fd14b1c07aac.tar.gz
apt-panopticon-2fa647fb5a2ba60dcc394ce5a223fd14b1c07aac.tar.bz2
apt-panopticon-2fa647fb5a2ba60dcc394ce5a223fd14b1c07aac.tar.xz
Clean up a nil issue.
Diffstat (limited to '')
-rwxr-xr-xapt-panopticon.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index def0197..b03810c 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -164,9 +164,12 @@ local log = function(v, t, s, prot, test, host)
164 t = t .. "(" .. x .. ")" 164 t = t .. "(" .. x .. ")"
165 if "" ~= prot then 165 if "" ~= prot then
166 if "" == test then 166 if "" == test then
167 if nil == results[prot] then results[prot] = {errors = 0; warnings = 0} end
167 if v == 0 then results[prot].errors = results[prot].errors + 1 end 168 if v == 0 then results[prot].errors = results[prot].errors + 1 end
168 if v == 1 then results[prot].warnings = results[prot].warnings + 1 end 169 if v == 1 then results[prot].warnings = results[prot].warnings + 1 end
169 else 170 else
171 if nil == results[prot] then results[prot] = {errors = 0; warnings = 0} end
172 if nil == results[prot][test] then results[prot][test] = {errors = 0; warnings = 0} end
170 if v == 0 then results[prot][test].errors = results[prot][test].errors + 1 end 173 if v == 0 then results[prot][test].errors = results[prot][test].errors + 1 end
171 if v == 1 then results[prot][test].warnings = results[prot][test].warnings + 1 end 174 if v == 1 then results[prot][test].warnings = results[prot][test].warnings + 1 end
172 end 175 end