From d0096eee74a6732061e4db1d537bf937d59d8091 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Sep 19 2018 13:33:41 +0000 Subject: [PATCH 1/2] Make the exception Python3 friendly Signed-off-by: Clement Verna --- diff --git a/ansible/library/fedcontainer_rc.py b/ansible/library/fedcontainer_rc.py index 7f4a2cc..3566526 100755 --- a/ansible/library/fedcontainer_rc.py +++ b/ansible/library/fedcontainer_rc.py @@ -312,7 +312,7 @@ def get_lists(release_num, cntr_list): ) ) - except Exception, e: + except Exception as e: module.exit_json( msg="Exception occurred attempting to query koji:\n{}".format(e) ) From 7f505f9550033710a610f637b171527971bc16da Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Sep 19 2018 13:35:43 +0000 Subject: [PATCH 2/2] Drop support for <28 release. This commit remove the search for docker build tag these tags were last used for fedora 27. Signed-off-by: Clement Verna --- diff --git a/ansible/library/fedcontainer_rc.py b/ansible/library/fedcontainer_rc.py index 3566526..1f7b0a1 100755 --- a/ansible/library/fedcontainer_rc.py +++ b/ansible/library/fedcontainer_rc.py @@ -281,22 +281,6 @@ def get_lists(release_num, cntr_list): if container_builds: full_nvr = container_builds[0]['nvr'] - else: - # Consider it an error case when it's not found in the container - # tag because it should be - errors.append("{} not found in f{}-container-build tag".format( - cntr, - release_num - ) - ) - - docker_builds = kc.getLatestBuilds( - "f{}-docker-build".format(release_num), - package=cntr - ) - if docker_builds: - full_nvr = docker_builds[0]['nvr'] - if full_nvr: # We want the full Name-Version-Release, but we also want the # shorthand Name and Name-Version references as well @@ -306,7 +290,7 @@ def get_lists(release_num, cntr_list): rclist.append("{}/{}".format(fgc, '-'.join(fnvr_split[:-2]))) rebuildlist.append("{}".format('-'.join(fnvr_split[:-2]))) else: - errors.append("{0} not found in f{1}-container-build or f{1}-docker-build tag".format( + errors.append("{0} not found in f{1}-container-build tag".format( cntr, release_num )