#2327 koji-gc: fix py3 compare behaviour for dicts
Merged 3 years ago by tkopecek. Opened 3 years ago by tkopecek.
tkopecek/koji issue2325  into  master

file modified
+9 -3
@@ -526,9 +526,15 @@ 

              else:

                  age = time.time() - ts

          else:

-             history = [(h['revoke_event'], h) for h in history]

-             last = max(history)[1]

-             if not last['revoke_event']:

+             tagged = False

+             last = history[0]

+             for h in history:

+                 if not h['revoke_event']:

+                     tagged = True

+                     break

+                 if h['revoke_event'] > last['revoke_event']:

+                     last = h

+             if tagged:

                  # this might happen if the build was tagged just now

                  print("[%i/%i] Warning: build not untagged: %s" % (i, N, nvr))

                  continue

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

3 years ago

pretty please pagure-ci rebuild

3 years ago

rebased onto b37853b

3 years ago

@julian8628 I've changed logic a bit - I suspect, that it was not working correctly before for race condition with tagging after untaggedBuilds was called. Can you look at it, please?

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

3 years ago

Commit f8d20f6 fixes this pull-request

Pull-Request has been merged by tkopecek

3 years ago