summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg/copy.py
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/vidhar/borg/copy.py')
-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()