diff options
author | Victor Häggqvist <[email protected]> | 2015-10-15 14:10:22 +0200 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2015-10-15 14:10:22 +0200 |
commit | ebbd8b3525adf5fef72cfbbf0bfa30beceec1cfc (patch) | |
tree | f938001e846d1989e826b8bd94eb4991dadfa871 | |
parent | dfb5f73eb5a072d123ea69b89c912ab9eaaf7611 (diff) |
unified fail msg
Diffstat (limited to '')
-rwxr-xr-x | giti | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -109,18 +109,19 @@ def giti(kind: str): print('Found no exact match, let\'s give searching a try...') filepath = search_for_file(kind) if not filepath: - print('Can\'t help any more, exiting') - print('No changes made') - exit(0) + terminate_gracefully() gifile = get_ignore_file(filepath, path=True) if not gifile: - print('Can\'t help any more, exiting') - print('No changes made') - exit(0) + terminate_gracefully() save_file(gifile) +def terminate_gracefully(): + print('Can\'t help any more, exiting') + print('No changes made') + exit(0) + def show_help(): print('Usage: giti [language or stuff]') |