From 9f22116f714cbc86da8a1cff6c7b8625f5d773ca Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 18 Feb 2022 12:40:37 +0100 Subject: vidhar: ... --- hosts/vidhar/borg/copy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): with Halo(text='Waiting for mount', **halo_args) as sp: wait_start = datetime.now() while True: - if os.path.ismount(dir): + ret = subprocess.run(['mountpoint', '-q', dir], preexec_fn=lambda: as_borg()) + if ret.returncode == 0: break elif datetime.now() - wait_start > timedelta(minutes=15): ret.check_returncode() -- cgit v1.2.3