Skip to content

Commit c18dfe9

Browse files
committed
fix ValueError when trying to mark done a package again
1 parent 6bdbbc0 commit c18dfe9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lilac

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,13 @@ class BuildSorter:
224224
return self.sorter.is_active()
225225

226226
def done(self, pkg: str) -> None:
227-
self.ready.remove(pkg)
228-
self.sorter.done(pkg)
227+
try:
228+
self.ready.remove(pkg)
229+
self.sorter.done(pkg)
230+
except ValueError:
231+
# we may try to remove a pkg twice because we may run check_buildability
232+
# twice: once for regular round, once for picking while starving
233+
pass
229234

230235
def get_ready(self) -> tuple[str, ...]:
231236
new = self.sorter.get_ready()

0 commit comments

Comments
 (0)