mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
modules: don't assume module content is a dictionary
This is done by having each module implement a top-level verifier function.
This commit is contained in:
parent
e471c2357d
commit
9944a8f972
13 changed files with 146 additions and 56 deletions
|
@ -341,8 +341,10 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
return false;
|
||||
}
|
||||
|
||||
assert(info->verify_conf != NULL);
|
||||
|
||||
chain_push(chain, mod_name);
|
||||
if (!conf_verify_dict(chain, values, info->attrs))
|
||||
if (!info->verify_conf(chain, values))
|
||||
return false;
|
||||
|
||||
chain_pop(chain);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue