diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 12:38:54 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 12:38:54 +0100 |
commit | a27bdcbacdf206945545ee12251fbfab838183b3 (patch) | |
tree | 9eb6c991b092fdd82a594c9e4346878c6903b658 /hosts/vidhar | |
parent | cf7bd776a362c53d8e1fc9e801235ca772385f32 (diff) | |
download | nixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar nixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar.gz nixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar.bz2 nixos-a27bdcbacdf206945545ee12251fbfab838183b3.tar.xz nixos-a27bdcbacdf206945545ee12251fbfab838183b3.zip |
vidhar: ...
Diffstat (limited to 'hosts/vidhar')
-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 |