summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/vidhar/borg')
-rwxr-xr-xhosts/vidhar/borg/copy.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 2ee4761d..324fea0b 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -245,6 +245,17 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
245 continue 245 continue
246 except subprocess.CalledProcessError as err: 246 except subprocess.CalledProcessError as err:
247 print(err, file=stderr) 247 print(err, file=stderr)
248
249 dst = None
250 try:
251 dst = read_repo(args.target)
252 except (subprocess.CalledProcessError, json.decoder.JSONDecodeError) as err:
253 print(err, file=stderr)
254 continue
255 else:
256 if any(map(lambda other: entry['name'] == other['name'], dst)):
257 break
258
248 continue 259 continue
249 else: 260 else:
250 break 261 break