diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-13 19:55:10 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-13 19:55:10 +0100 |
commit | 24320f012ab36285f1ee3c3029833ccc157747c9 (patch) | |
tree | 99a141212e1ea81fc7d9d0fea8b7222ca8a7401b /hosts/vidhar | |
parent | ce03978f5fc57524fde8d38143b42153f08836fd (diff) | |
download | nixos-24320f012ab36285f1ee3c3029833ccc157747c9.tar nixos-24320f012ab36285f1ee3c3029833ccc157747c9.tar.gz nixos-24320f012ab36285f1ee3c3029833ccc157747c9.tar.bz2 nixos-24320f012ab36285f1ee3c3029833ccc157747c9.tar.xz nixos-24320f012ab36285f1ee3c3029833ccc157747c9.zip |
...
Diffstat (limited to 'hosts/vidhar')
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 11 |
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 |