From 718601e0691234edeb4c520ff15b4e6b1c4aa906 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 8 Apr 2023 21:59:01 +0100 Subject: setbranch : make sure it stops with keyboard interrupt --- src/backend/setbranch.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/backend') 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 = [] -- cgit v1.2.3