Skip to content

Commit

Permalink
Catching KeyboardInterrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
Scstechr committed Aug 2, 2019
1 parent ced1345 commit 2f20169
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import sys, subprocess as sp
from os import path, chdir, getcwd
import os
import cursor

from src import issues
from src.qs import getAnswer, isExist , confirm
Expand Down Expand Up @@ -114,4 +115,7 @@ def main():
issues.ok('No push')

if __name__ == "__main__":
main()
try:
main()
except KeyboardInterrupt:
issues.abort()
1 change: 1 addition & 0 deletions src/qs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import subprocess as sp
from . import issues
import sys

def echo(string):
print(string)
Expand Down

0 comments on commit 2f20169

Please sign in to comment.