diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 13:56:30 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-17 13:56:30 +0100 |
commit | 0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08 (patch) | |
tree | b426b3201cf9c61fce081ee4f3217dcf6a1eca5d /hosts/vidhar/borg/copy.py | |
parent | 957110f6549c2917d0f47951923d454891d6fdb3 (diff) | |
download | nixos-0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08.tar nixos-0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08.tar.gz nixos-0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08.tar.bz2 nixos-0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08.tar.xz nixos-0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08.zip |
vidhar: ...
Diffstat (limited to 'hosts/vidhar/borg/copy.py')
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py index 23c45fcf..64ae0a71 100755 --- a/hosts/vidhar/borg/copy.py +++ b/hosts/vidhar/borg/copy.py | |||
@@ -51,7 +51,7 @@ def read_repo(path): | |||
51 | return res | 51 | return res |
52 | 52 | ||
53 | class ToSync: | 53 | class ToSync: |
54 | to_sync = set() | 54 | to_sync = [] |
55 | 55 | ||
56 | def __iter__(self): | 56 | def __iter__(self): |
57 | return self | 57 | return self |
@@ -68,9 +68,7 @@ class ToSync: | |||
68 | print(err, file=stderr) | 68 | print(err, file=stderr) |
69 | continue | 69 | continue |
70 | 70 | ||
71 | for entry in src: | 71 | self.to_sync = [entry for entry in src if entry['name'] not in {dst_entry['name'] for dst_entry in dst} and not entry['name'].endswith('.checkpoint')] |
72 | if entry['name'] not in {dst_entry['name'] for dst_entry in dst} and not entry['name'].endswith('.checkpoint'): | ||
73 | self.to_sync.add(entry) | ||
74 | 72 | ||
75 | if self.to_sync: | 73 | if self.to_sync: |
76 | return self.to_sync.pop() | 74 | return self.to_sync.pop() |