diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-18 12:40:37 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-18 12:40:37 +0100 |
commit | 9f22116f714cbc86da8a1cff6c7b8625f5d773ca (patch) | |
tree | 98c643df08db8cecaeddb47a550fc6c01fca8a18 | |
parent | 8029ba6ae6c61ab2e792c12923323bddb9ca6956 (diff) | |
download | nixos-9f22116f714cbc86da8a1cff6c7b8625f5d773ca.tar nixos-9f22116f714cbc86da8a1cff6c7b8625f5d773ca.tar.gz nixos-9f22116f714cbc86da8a1cff6c7b8625f5d773ca.tar.bz2 nixos-9f22116f714cbc86da8a1cff6c7b8625f5d773ca.tar.xz nixos-9f22116f714cbc86da8a1cff6c7b8625f5d773ca.zip |
vidhar: ...
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py index 35598043..c0f17a5b 100755 --- a/hosts/vidhar/borg/copy.py +++ b/hosts/vidhar/borg/copy.py | |||
@@ -149,7 +149,8 @@ def copy_archive(src_repo_path, dst_repo_path, entry): | |||
149 | with Halo(text='Waiting for mount', **halo_args) as sp: | 149 | with Halo(text='Waiting for mount', **halo_args) as sp: |
150 | wait_start = datetime.now() | 150 | wait_start = datetime.now() |
151 | while True: | 151 | while True: |
152 | if os.path.ismount(dir): | 152 | ret = subprocess.run(['mountpoint', '-q', dir], preexec_fn=lambda: as_borg()) |
153 | if ret.returncode == 0: | ||
153 | break | 154 | break |
154 | elif datetime.now() - wait_start > timedelta(minutes=15): | 155 | elif datetime.now() - wait_start > timedelta(minutes=15): |
155 | ret.check_returncode() | 156 | ret.check_returncode() |