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