summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2019-09-05 16:38:59 +0200
committerVladimír Čunát <vladimir.cunat@nic.cz>2019-09-17 16:10:50 +0200
commit46b582dc25f0bbc5cc432ae49be62e95f8b7fc86 (patch)
tree89b30d44776825ad50935cdfbcbcae0edce028f4 /modules
parentMerge branch 'ci-updates' into 'master' (diff)
downloadknot-resolver-46b582dc25f0bbc5cc432ae49be62e95f8b7fc86.tar.xz
knot-resolver-46b582dc25f0bbc5cc432ae49be62e95f8b7fc86.zip
prefill module: allow a different module-loading style
Otherwise plain `modules = { 'prefill' }` will error out, which is surprising wrt. to style used/allowed by other modules.
Diffstat (limited to 'modules')
-rw-r--r--modules/prefill/prefill.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/prefill/prefill.lua b/modules/prefill/prefill.lua
index c573ed9e..1f99d2d1 100644
--- a/modules/prefill/prefill.lua
+++ b/modules/prefill/prefill.lua
@@ -181,8 +181,9 @@ local function config_zone(zone_cfg)
end
function prefill.config(config)
+ if config == nil then return end -- e.g. just modules = { 'prefill' }
local root_configured = false
- if not config or type(config) ~= 'table' then
+ if type(config) ~= 'table' then
error('[prefill] configuration must be in table '
.. '{owner name = {per-zone config}}')
end