diff options
Diffstat (limited to 'hosts')
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py index 04bb61f8..d8d64dca 100755 --- a/hosts/vidhar/borg/copy.py +++ b/hosts/vidhar/borg/copy.py | |||
@@ -21,6 +21,7 @@ from xdg import xdg_runtime_dir | |||
21 | import pathlib | 21 | import pathlib |
22 | 22 | ||
23 | import unshare | 23 | import unshare |
24 | import signal | ||
24 | from time import sleep | 25 | from time import sleep |
25 | 26 | ||
26 | from halo import Halo | 27 | from halo import Halo |
@@ -199,7 +200,12 @@ def copy_archive(src_repo_path, dst_repo_path, entry): | |||
199 | if waitpid == child: | 200 | if waitpid == child: |
200 | break | 201 | break |
201 | 202 | ||
203 | def sigterm(signum, frame): | ||
204 | raise SystemExit(128 + signum) | ||
205 | |||
202 | def main(): | 206 | def main(): |
207 | signal.signal(signal.SIGTERM, sigterm) | ||
208 | |||
203 | if "::" in args.source: | 209 | if "::" in args.source: |
204 | (src_repo_path, _, src_archive) = args.source.partition("::") | 210 | (src_repo_path, _, src_archive) = args.source.partition("::") |
205 | entry = None | 211 | entry = None |