From 56e7753035bbffb604b869bfceaf35367bf88a17 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 25 Jul 2015 21:01:38 +0200 Subject: [PATCH] check_site: allow subcheck to be nil in need_table() --- scripts/check_site_lib.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/check_site_lib.lua b/scripts/check_site_lib.lua index ec2498ec..99489302 100644 --- a/scripts/check_site_lib.lua +++ b/scripts/check_site_lib.lua @@ -84,8 +84,10 @@ function need_table(varname, subcheck, required) assert_type(var, 'table', "site.conf error: expected `" .. varname .. "' to be a table") - for k, v in pairs(var) do - subcheck(k, v) + if subcheck then + for k, v in pairs(var) do + subcheck(k, v) + end end return var