add action notify to action config

This commit is contained in:
2021-09-10 15:59:58 +02:00
parent 2b73e43d2f
commit 24d9eb3502
3 changed files with 33 additions and 3 deletions

View File

@@ -104,6 +104,17 @@ class BaseConfig:
f"{self['name']}: {arg}: invalid value, should be bool"
self["args"][arg] = cfg[arg]
def add_int_arg(self, cfg, args):
if isinstance(args, str):
args = [args]
for arg in args:
assert arg in cfg, \
f"{self['name']}: mandatory parameter '{arg}' not found"
assert isinstance(cfg[arg], int), \
f"{self['name']}: {arg}: invalid value, should be integer"
self["args"][arg] = cfg[arg]
class MilterMessage(MIMEPart):
def replace_header(self, _name, _value, idx=None):