From 0e82017bd943e50478990b88cc10419509b6670b Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Apr 15 2020 11:46:56 +0000 Subject: koji-gc: various typos in maven path Fixes: https://pagure.io/koji/issue/2152 --- diff --git a/util/koji-gc b/util/koji-gc index eafc13c..7fc3a90 100755 --- a/util/koji-gc +++ b/util/koji-gc @@ -696,10 +696,10 @@ def handle_delete(just_salvage=False): continuing, trash = [], continuing for nvr, binfo in trash: # determine how long this build has been in the trashcan - mcall.queryHistory(build=binfo['id'], tag=trashcan_tag)['tag_listing'] + mcall.queryHistory(build=binfo['id'], tag=trashcan_tag) for (nvr, binfo), [history] in zip(trash, mcall.call_all()): - current = [x for x in history if x['active']] + current = [x for x in history['tag_listing'] if x['active']] if not current: # untagged just now? print("Warning: history missing for %s" % nvr) @@ -898,7 +898,7 @@ def handle_prune(): continue pkghist = {} for h in history: - if taginfo['maven_include_all'] and h.get('maven_build_id', default=None): + if taginfo['maven_include_all'] and h.get('maven_build_id'): pkghist.setdefault(h['name'] + '-' + h['version'], []).append(h) else: pkghist.setdefault(h['name'], []).append(h)