koji-gc: fix py3 compare behaviour for dicts

Fixes: https://pagure.io/koji/issue/2325
This commit is contained in:
Tomas Kopecek 2020-06-18 13:26:12 +02:00
parent c0b05c0770
commit 7c0acaaa10

View file

@ -526,8 +526,11 @@ def handle_trash():
else:
age = time.time() - ts
else:
history = [(h['revoke_event'], h) for h in history]
last = max(history)[1]
last = history[0]
for h in history:
actual = h['revoke_event'] or 0
if not last['revoke_event'] or actual > last['revoke_event']:
last = h
if not last['revoke_event']:
# this might happen if the build was tagged just now
print("[%i/%i] Warning: build not untagged: %s" % (i, N, nvr))