From 4028247ac6bba30731efc1ee346c6752ae6eb3c3 Mon Sep 17 00:00:00 2001 From: dpetrov67 Date: Tue, 14 Feb 2023 11:53:40 -0500 Subject: [PATCH] Fix pcall() argument in rspamd.lua --- rules/rspamd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/rspamd.lua b/rules/rspamd.lua index 98fc5e09e..5d93dec00 100644 --- a/rules/rspamd.lua +++ b/rules/rspamd.lua @@ -57,7 +57,7 @@ local rmaps = rspamd_config:get_all_opt("lua_maps") if rmaps and type(rmaps) == 'table' then local rspamd_logger = require "rspamd_logger" for k,v in pairs(rmaps) do - local status,map_or_err = pcall(rspamd_config:add_map(v)) + local status,map_or_err = pcall(function () return rspamd_config:add_map(v) end) if not status then rspamd_logger.errx(rspamd_config, "cannot add map %s: %s", k, map_or_err) -- 2.39.5