From d3b7be42b43c30e6540e66525aaa18d1bcb2ee1c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 21 Nov 2019 11:16:40 +0100 Subject: [PATCH] Fix how the CC list is being generated The data structure having changed, the code needed to be adjusted as well. Signed-off-by: Pierre-Yves Chibon --- distgit_bugzilla_sync/script.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index 8767ebf..b5906bd 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -218,21 +218,13 @@ class BugzillaProxy: ''' # Turn the cclist into something usable by bugzilla initialCCList = [] - if cclist and 'people' in cclist: - for cc in cclist["people"]: - bz_email = self._get_bugzilla_email(cc) - if bz_email: - initialCCList.append(bz_email) - else: - print(f"** {cc} has no bugzilla_email or mailing_list set " - f"({collection}/{package}) **") - if cclist and 'groups' in cclist: - for cc in cclist["groups"]: - bz_email = self._get_bugzilla_email(cc) - if bz_email: - initialCCList.append(bz_email) - else: - print(f"** {cc} has no mailing-list set in FAS! ({collection}/{package}) **") + for watcher in cclist: + bz_email = self._get_bugzilla_email(watcher) + if bz_email: + initialCCList.append(bz_email) + else: + print(f"** {watcher} has no bugzilla_email or mailing_list set " + f"({collection}/{package}) **") # Add owner to the cclist so comaintainers taking over a bug don't # have to do this manually