summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-08 21:52:03 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-08 21:52:03 +0100
commitbadc3710e1afb5ac7339b9c17d72a3078f91d881 (patch)
tree9c04aab79b05d7d364ba643a5383ed284803e06f /src/backend
parentfa38e476f96a8ab15d3db8cac3cb664184c015d7 (diff)
make sure download stops with keyboard interrupt
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/download.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/download.py b/src/backend/download.py
index 53fa936..2150a25 100644
--- a/src/backend/download.py
+++ b/src/backend/download.py
@@ -3,6 +3,7 @@
import atexit
import io
import os
+import signal
import subprocess
import sys
import pickle
@@ -10,6 +11,13 @@ import sisyphus.getfs
import sisyphus.killemerge
+def sigint_handler(signal, frame):
+ sys.exit(0)
+
+
+signal.signal(signal.SIGINT, sigint_handler)
+
+
def start(dl_world=False, gfx_ui=False):
dl_list = []