Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Commit

Permalink
Don't overwrite branch.
Browse files Browse the repository at this point in the history
This should fix https://pagure.io/fedora-infrastructure/issue/6928

The branch name from the distgit message and the branch dict from PDC were
being stored in the same variable, confusing things.  This keeps them separate.
  • Loading branch information
ralphbean committed May 11, 2018
1 parent f57e662 commit 65ebd4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdcupdater/handlers/retirement.py
Expand Up @@ -37,7 +37,7 @@ def handle(self, pdc, msg):
a dead.package file to the repo). In response, this method will retire
the package in PDC.
"""
branch = msg['msg']['commit']['branch']
branchname = msg['msg']['commit']['branch']
repo = msg['msg']['commit']['repo']
namespace = msg['msg']['commit']['namespace']
component_type = self._namespace_to_pdc(namespace)
Expand All @@ -49,7 +49,7 @@ def handle(self, pdc, msg):
# This query guarantees a unique component branch, so a count of 1 is
# expected
branch_query_rv = pdc['component-branches']._(
name=branch, type=component_type, global_component=repo)
name=branchname, type=component_type, global_component=repo)

if branch_query_rv['count'] != 1:
log.error('"{0}/{1}" was not found in PDC'.format(namespace, repo))
Expand All @@ -65,7 +65,7 @@ def handle(self, pdc, msg):
# intermediate commits contained a dead.package.
fileurl = checkurl % {'namespace': namespace,
'repo': repo,
'branch': branch,
'branch': branchname,
'file': 'dead.package'}
log.info('Checking for file: %s' % fileurl)
resp = requests.head(fileurl, timeout=15)
Expand Down

0 comments on commit 65ebd4a

Please sign in to comment.