summaryrefslogtreecommitdiff
path: root/src/backend/update.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-08 14:20:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-08 14:20:06 +0100
commit9433b5e797848546351ae3dc7602813191e01bf6 (patch)
tree273b8dce53cdd4e0fdcf1bd25799683e4473e333 /src/backend/update.py
parentaab2a6ca78f41a41673d03d22da2c562ee90901b (diff)
update : handle KeyboardInterrupt gracefully
Diffstat (limited to 'src/backend/update.py')
-rw-r--r--src/backend/update.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/update.py b/src/backend/update.py
index 54e07e3..0c25068 100644
--- a/src/backend/update.py
+++ b/src/backend/update.py
@@ -1,6 +1,7 @@
#!/usr/bin/python3
import animation
+import signal
import sys
import time
import sisyphus.checkenv
@@ -11,6 +12,13 @@ import sisyphus.syncdb
import sisyphus.syncenv
+def sigint_handler(signal, frame):
+ sys.exit(0)
+
+
+signal.signal(signal.SIGINT, sigint_handler)
+
+
def sync_evrth():
sisyphus.syncenv.g_repo()
sisyphus.syncenv.r_repo()