Set the qacontact info in one place to reduce code duplication
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
cd9696f0cb
commit
5c4a6dc32a
1 changed files with 7 additions and 13 deletions
|
@ -257,18 +257,18 @@ class BugzillaProxy:
|
|||
e.args = ('ProtocolError', e.errcode, e.errmsg)
|
||||
raise
|
||||
|
||||
# Set the qacontact_email and name
|
||||
if qacontact:
|
||||
qacontact_email = self._get_bugzilla_email(qacontact)
|
||||
else:
|
||||
qacontact_email = 'extras-qa@fedoraproject.org'
|
||||
qacontact = '<default: extras-qa@...>'
|
||||
|
||||
pkg_key = package.lower()
|
||||
if pkg_key in product:
|
||||
# edit the package information
|
||||
data = {}
|
||||
|
||||
# Grab bugzilla email for things changable via xmlrpc
|
||||
if qacontact:
|
||||
qacontact_email = self._get_bugzilla_email(qacontact)
|
||||
else:
|
||||
qacontact_email = 'extras-qa@fedoraproject.org'
|
||||
qacontact = f'<default: extras-qa@...>'
|
||||
|
||||
# Check for changes to the owner, qacontact, or description
|
||||
if product[pkg_key]['initialowner'] != owner_email:
|
||||
data['initialowner'] = owner_email
|
||||
|
@ -348,12 +348,6 @@ class BugzillaProxy:
|
|||
raise
|
||||
else:
|
||||
# Add component
|
||||
if qacontact:
|
||||
qacontact_email = self._get_bugzilla_email(qacontact)
|
||||
else:
|
||||
qacontact_email = 'extras-qa@fedoraproject.org'
|
||||
qacontact = f'<default: extras-qa@...>'
|
||||
|
||||
data = {
|
||||
'product': self.config['products'][collection],
|
||||
'component': package,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue