diff options
author | Victor Häggqvist <[email protected]> | 2015-12-09 23:15:50 +0100 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2015-12-09 23:15:50 +0100 |
commit | c02e5aabc6811ac77ac8820e9f913a54766e6633 (patch) | |
tree | 78bb868e9e0b211a7a50f9ad3865dc422b060f4e | |
parent | 391c12ca021cdfbed50d449bc20ada68fd59493c (diff) |
catch KeyboardInterrupt
-rwxr-xr-x | giti | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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: |