Simplify how the initialCClist is being built

This makes the code for people using the same logic as the code for
groups thus making it easier to read and review.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2019-11-20 09:43:48 +01:00
parent 59ded2d591
commit b002898f2b

View file

@ -216,11 +216,11 @@ class BugzillaProxy:
'''Add or update a component to have the values specified.
'''
# Turn the cclist into something usable by bugzilla
if not cclist or 'people' not in cclist:
initialCCList = list()
else:
initialCCList = [
initialCCList = list()
if 'people' in cclist:
user_cc = [
self._get_bugzilla_email(cc) for cc in cclist['people']]
initialCCList.extend(user_cc)
if 'groups' in cclist:
group_cc = [
self._get_bugzilla_email(cc) for cc in cclist['groups']]