summaryrefslogtreecommitdiff
path: root/src/backend/setbranch.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-08 21:59:01 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-08 21:59:01 +0100
commit718601e0691234edeb4c520ff15b4e6b1c4aa906 (patch)
treef8cd9582c546a8d8cdd358dc9a12283450272a80 /src/backend/setbranch.py
parentf47c51c17f4d743ecd15f977097c5ae6fb82a82e (diff)
setbranch : make sure it stops with keyboard interrupt
Diffstat (limited to 'src/backend/setbranch.py')
-rw-r--r--src/backend/setbranch.py8
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 = []