diff options
Diffstat (limited to 'patternutils/commands/tmv.py')
| -rw-r--r-- | patternutils/commands/tmv.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/patternutils/commands/tmv.py b/patternutils/commands/tmv.py index 3f618d2..7d0be21 100644 --- a/patternutils/commands/tmv.py +++ b/patternutils/commands/tmv.py @@ -62,7 +62,14 @@ def tmv( raise SystemExit if use_predefined_template: - output_pattern, template_engine = config.load_template(output_pattern, 'tmv') + try: + output_pattern, template_engine = config.load_template(output_pattern, 'tmv') + except FileNotFoundError: + click.secho('File not found!', fg='red', err=True) + raise SystemExit + except RuntimeError: + click.secho('Multiple files found!', fg='red', err=True) + raise SystemExit try: render = template.get_render_function(output_pattern, engine=template_engine) |
