From e58c813fafc7786cedcebf2406ac066f7a7f4d6e Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 16 2020 09:22:25 +0000 Subject: PR#2256: Don't break on deleted tag Merges #2256 https://pagure.io/koji/pull-request/2256 Fixes: #1965 https://pagure.io/koji/issue/1965 koji-gc can fail on deleted tag --- diff --git a/util/koji-gc b/util/koji-gc index 698dc6c..87b7b86 100755 --- a/util/koji-gc +++ b/util/koji-gc @@ -873,7 +873,7 @@ def handle_prune(): if options.debug: print("Pruning tag: %s" % tagname) # get builds - history = session.queryHistory(tag=tagname, active=True)['tag_listing'] + history = session.queryHistory(tag=taginfo['id'], active=True)['tag_listing'] history = sorted(history, key=lambda x: -x['create_ts']) if not history: if options.debug: