aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-10-15 14:10:22 +0200
committerVictor Häggqvist <[email protected]>2015-10-15 14:10:22 +0200
commitebbd8b3525adf5fef72cfbbf0bfa30beceec1cfc (patch)
treef938001e846d1989e826b8bd94eb4991dadfa871
parentdfb5f73eb5a072d123ea69b89c912ab9eaaf7611 (diff)
unified fail msg
-rwxr-xr-xgiti13
1 files changed, 7 insertions, 6 deletions
diff --git a/giti b/giti
index 1d56cff..0502902 100755
--- a/giti
+++ b/giti
@@ -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]')