diff options
Diffstat (limited to 'patternutils')
| -rw-r--r-- | patternutils/commands/targs.py | 2 | ||||
| -rw-r--r-- | patternutils/template.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/patternutils/commands/targs.py b/patternutils/commands/targs.py index 14ecce7..59a8ab3 100644 --- a/patternutils/commands/targs.py +++ b/patternutils/commands/targs.py @@ -66,7 +66,7 @@ def targs( use_jinja = True if template_engine == 'jinja2' else False try: - render = template.get_render_function(command, use_jinja=use_jinja) + render = template.get_render_function(command, engine=template_engine) except RuntimeError: click.secho('jinja2 not installed!', fg='red', err=True) raise SystemExit diff --git a/patternutils/template.py b/patternutils/template.py index de1b94c..f45d856 100644 --- a/patternutils/template.py +++ b/patternutils/template.py @@ -33,8 +33,8 @@ else: jinja_env.filters['quote'] = quote -def get_render_function(template: str, *, use_jinja: bool=False) -> Callable[..., str]: - if use_jinja: +def get_render_function(template: str, *, engine: str='python') -> Callable[..., str]: + if engine == 'jinja2': if jinja_feature: env_template = jinja_env.from_string(template) render_function = env_template.render |
