From 0a98d0aaa5c41ed37e9db183e7a5c26e0290ec08 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 17 Feb 2022 13:56:30 +0100 Subject: vidhar: ... --- hosts/vidhar/borg/copy.py | 6 ++---- 1 file 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): return res class ToSync: - to_sync = set() + to_sync = [] def __iter__(self): return self @@ -68,9 +68,7 @@ class ToSync: print(err, file=stderr) continue - for entry in src: - if entry['name'] not in {dst_entry['name'] for dst_entry in dst} and not entry['name'].endswith('.checkpoint'): - self.to_sync.add(entry) + 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')] if self.to_sync: return self.to_sync.pop() -- cgit v1.2.3