diff options
| -rw-r--r-- | patternutils/commands/patterncfg.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/patternutils/commands/patterncfg.py b/patternutils/commands/patterncfg.py index 3ef0518..83168cf 100644 --- a/patternutils/commands/patterncfg.py +++ b/patternutils/commands/patterncfg.py @@ -61,10 +61,7 @@ def add(template_engine: Optional[str], command: str, name: str) -> None: if command == "pmatch": fileext = "regex" else: - if template_engine not in ("python", "jinja2"): - fileext = "python" - else: - fileext = template_engine + fileext = "jinja2" if template_engine == "jinja2" else "python" filename = os.path.join(config.CONFIG_PATH, command, f"{name}.{fileext}") click.edit(filename=filename) |
