mako uses non-standard INI format where the order of sections matters - restructure settings? #7944
zane-weissman
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The notification daemon mako uses INI-style sections to represent criteria that incoming notifications are matched against when setting per-notification options. Criteria are checked in the order that they appear in the file, so the order of sections matters. Of course, attributes in attrsets do not have a properly defined order, so the order of sections generated by a single call of
lib.generators.toINIcannot be declared before evaluation.I've hacked together a quick solution using lists (which retain element order during evaluation) that works fine for my own purposes:
I'm wondering if there's any interest in adding a
services.mako.criteriaoption (and, I assume, deprecating and replacingservices.mako.settings). I don't know if/how this is handled in similar cases, but I would be happy to put together a PR if it would be a useful addition.Beta Was this translation helpful? Give feedback.
All reactions