summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-18 12:37:59 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-18 12:37:59 +0100
commit8029ba6ae6c61ab2e792c12923323bddb9ca6956 (patch)
treedf9fac2fe9981482963a08144dfd1fd4f463fec4 /hosts
parenta670d87e11f2a12980ce149313529b32c266e4da (diff)
downloadnixos-8029ba6ae6c61ab2e792c12923323bddb9ca6956.tar
nixos-8029ba6ae6c61ab2e792c12923323bddb9ca6956.tar.gz
nixos-8029ba6ae6c61ab2e792c12923323bddb9ca6956.tar.bz2
nixos-8029ba6ae6c61ab2e792c12923323bddb9ca6956.tar.xz
nixos-8029ba6ae6c61ab2e792c12923323bddb9ca6956.zip
vidhar: ...
Diffstat (limited to 'hosts')
-rwxr-xr-xhosts/vidhar/borg/copy.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 752b5cba..35598043 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -149,9 +149,7 @@ 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 subprocess.run(['mount'], check=True) 152 if os.path.ismount(dir):
153 ret = subprocess.run(['mountpoint', '-q', dir])
154 if ret.returncode == 0:
155 break 153 break
156 elif datetime.now() - wait_start > timedelta(minutes=15): 154 elif datetime.now() - wait_start > timedelta(minutes=15):
157 ret.check_returncode() 155 ret.check_returncode()