diff options
Diffstat (limited to 'hosts/vidhar/borg')
-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() |