diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-04-08 21:59:01 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-04-08 21:59:01 +0100 |
commit | 718601e0691234edeb4c520ff15b4e6b1c4aa906 (patch) | |
tree | f8cd9582c546a8d8cdd358dc9a12283450272a80 | |
parent | f47c51c17f4d743ecd15f977097c5ae6fb82a82e (diff) |
setbranch : make sure it stops with keyboard interrupt
-rw-r--r-- | src/backend/setbranch.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/setbranch.py b/src/backend/setbranch.py index 23b1b86..ca349f9 100644 --- a/src/backend/setbranch.py +++ b/src/backend/setbranch.py @@ -3,6 +3,7 @@ import animation import git import os +import signal import sys import sisyphus.checkenv import sisyphus.getcolor @@ -26,6 +27,13 @@ brch_rmt_map = { } +def sigint_handler(signal, frame): + sys.exit(0) + + +signal.signal(signal.SIGINT, sigint_handler) + + def get_brch_rmt(branch, remote): g_rmt = [] r_rmt = [] |