From 40c0c6759134b975e2fb2fcc60a2f1df1b081afd Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Mon, 8 Feb 2021 19:14:32 +0000 Subject: [PATCH] BUILDBOT: Fix cleaning when latest symlink isn't considered --- buildbot-config/scummsteps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildbot-config/scummsteps.py b/buildbot-config/scummsteps.py index 568b5cb..064f8b4 100644 --- a/buildbot-config/scummsteps.py +++ b/buildbot-config/scummsteps.py @@ -400,7 +400,7 @@ class CleanupSnapshots(steps.BuildStep): for platform, history in histories.items(): # Sort by mtime, most recent first history.sort(key=operator.itemgetter(1), reverse=True) - symlink, latest = latests.pop(platform, None) + symlink, latest = latests.pop(platform, (None, None)) # Exclude N first files from cleaning: that's our history # If latest point at it, don't clean it too. That shouldn't, but in case. to_clean.extend(path for path, mtime in history[self.keep_builds:] if path != latest)