configd - Jinja2 templates, support shlex_split to split parameters in shell format

This commit is contained in:
Ad Schellevis 2021-11-19 19:56:52 +01:00
parent d0cc926145
commit 6db23da495

View File

@ -66,6 +66,7 @@ class Template(object):
self._j2_env.filters['decode_idna'] = lambda x:x.decode('idna')
self._j2_env.filters['encode_idna'] = self._encode_idna
self._j2_env.filters['shlex_quote'] = shlex.quote
self._j2_env.filters['shlex_split'] = shlex.split
self._j2_env.filters['regex_replace'] = lambda value, pattern, replacement: re.sub(pattern, replacement, value)
@staticmethod