diff options
| author | Dennis Fink | 2019-11-18 16:47:10 +0100 |
|---|---|---|
| committer | Dennis Fink | 2019-11-18 16:47:10 +0100 |
| commit | 1ca9f29a4ca25b7a0d70bde1697b528482772a06 (patch) | |
| tree | 49baf9efb4453cb199fa96c0796d0797aec618cd | |
| parent | afb6c53a54c1466021a0b7fd09334217f30e94a6 (diff) | |
| download | patternutils-1ca9f29a4ca25b7a0d70bde1697b528482772a06.tar.gz patternutils-1ca9f29a4ca25b7a0d70bde1697b528482772a06.zip | |
Add a more helpful error message, if multiple files are found.
| -rw-r--r-- | patternutils/commands/patterncfg.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/patternutils/commands/patterncfg.py b/patternutils/commands/patterncfg.py index 96e9ac7..5215d56 100644 --- a/patternutils/commands/patterncfg.py +++ b/patternutils/commands/patterncfg.py @@ -75,7 +75,7 @@ def remove(command: Optional[str], name: str) -> None: click.secho('No files found!', fg='red', err=True) raise SystemExit elif len(files) != 1: - click.secho('Multiple files found!', fg='red', err=True) + click.secho('Multiple files found! Please specify the command from which to remove the file.', fg='red', err=True) for f in files: click.secho(f, fg='red', err=True) raise SystemExit @@ -96,7 +96,7 @@ def view(name: str, command: str, color: bool) -> None: click.secho('No files found!', fg='red', err=True) raise SystemExit elif len(files) != 1: - click.secho('Multiple files found!', fg='red', err=True) + click.secho('Multiple files found! Please specify the command from which to view the file.', fg='red', err=True) for f in files: click.secho(f, fg='red', err=True) raise SystemExit @@ -130,7 +130,7 @@ def edit(name: str, command: str) -> None: click.secho('No files found!', fg='red', err=True) raise SystemExit elif len(files) != 1: - click.secho('Multiple files found!', fg='red', err=True) + click.secho('Multiple files found! Please specify the command from which to edit the file.', fg='red', err=True) for f in files: click.secho(f, fg='red', err=True) raise SystemExit |
