diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-13 19:48:56 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-13 19:48:56 +0100 |
commit | ce03978f5fc57524fde8d38143b42153f08836fd (patch) | |
tree | ec073e219d67c52a163ae7ce2ca00737c21d2a31 /hosts/vidhar/borg | |
parent | df031eef28db52d9b050843182818b4c4580f08e (diff) | |
download | nixos-ce03978f5fc57524fde8d38143b42153f08836fd.tar nixos-ce03978f5fc57524fde8d38143b42153f08836fd.tar.gz nixos-ce03978f5fc57524fde8d38143b42153f08836fd.tar.bz2 nixos-ce03978f5fc57524fde8d38143b42153f08836fd.tar.xz nixos-ce03978f5fc57524fde8d38143b42153f08836fd.zip |
Revert "vidhar: borg: fix loop in copy"
This reverts commit df031eef28db52d9b050843182818b4c4580f08e.
Diffstat (limited to 'hosts/vidhar/borg')
-rwxr-xr-x | hosts/vidhar/borg/copy.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py index 46c9bcee..2ee4761d 100755 --- a/hosts/vidhar/borg/copy.py +++ b/hosts/vidhar/borg/copy.py | |||
@@ -71,23 +71,13 @@ def read_repo(path): | |||
71 | 71 | ||
72 | class ToSync: | 72 | class ToSync: |
73 | to_sync = deque() | 73 | to_sync = deque() |
74 | seen = set() | ||
75 | 74 | ||
76 | def __iter__(self): | 75 | def __iter__(self): |
77 | return self | 76 | return self |
78 | 77 | ||
79 | def __next__(self): | 78 | def __next__(self): |
80 | if self.to_sync: | 79 | if self.to_sync: |
81 | next_repo = self.to_sync.popleft() | 80 | return self.to_sync.popleft() |
82 | if next_repo['id'] in self.seen: | ||
83 | self.to_sync = deque() | ||
84 | self.seen = set() | ||
85 | next_repo = None | ||
86 | else: | ||
87 | self.seen.add(next_repo['id']) | ||
88 | |||
89 | if next_repo: | ||
90 | return next_repo | ||
91 | 81 | ||
92 | while True: | 82 | while True: |
93 | try: | 83 | try: |