aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-12-09 23:15:50 +0100
committerVictor Häggqvist <[email protected]>2015-12-09 23:15:50 +0100
commitc02e5aabc6811ac77ac8820e9f913a54766e6633 (patch)
tree78bb868e9e0b211a7a50f9ad3865dc422b060f4e
parent391c12ca021cdfbed50d449bc20ada68fd59493c (diff)
catch KeyboardInterrupt
-rwxr-xr-xgiti4
1 files changed, 4 insertions, 0 deletions
diff --git a/giti b/giti
index ec34bdf..8e1056e 100755
--- a/giti
+++ b/giti
@@ -89,12 +89,16 @@ def save_file(file: str):
merge = 'y' if merge == '' else 'n'
except KeyError:
merge = 'y'
+ except KeyboardInterrupt:
+ terminate_gracefully()
if merge.lower() == "n":
try:
replace = input('Do you want to replace existing .gitignore [y/N]: ')
except KeyError:
replace = 'n'
+ except KeyboardInterrupt:
+ terminate_gracefully()
if merge.lower() == 'y':
with open('.gitignore', 'a') as f: