diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index aba8dfb..8cfdbad 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -327,11 +327,13 @@ class BugzillaProxy: ''' # Turn the cclist into something usable by bugzilla initial_cc_emails = [] + initial_cc_emails_lower = [] initial_cc_fasnames = [] for watcher in cclist: bz_email = self._get_bugzilla_email(watcher) if bz_email: - initial_cc_emails.append(bz_email.lower()) + initial_cc_emails.append(bz_email) + initial_cc_emails_lower.append(bz_email.lower()) initial_cc_fasnames.append(watcher) else: self.errors.append( @@ -345,8 +347,9 @@ class BugzillaProxy: # Add owner to the cclist so comaintainers taking over a bug don't # have to do this manually owner_email = self._get_bugzilla_email(owner) - if owner_email not in initial_cc_emails: - initial_cc_emails.append(owner_email.lower()) + if owner_email.lower() not in initial_cc_emails_lower: + initial_cc_emails.append(owner_email) + initial_cc_emails_lower.append(owner_email.lower()) initial_cc_fasnames.append(owner) # Lookup product @@ -390,7 +393,7 @@ class BugzillaProxy: data['initialcclist'] = initial_cc_emails else: for cc_member in product[pkg_key]['initialcclist']: - if cc_member.lower() not in initial_cc_emails: + if cc_member.lower() not in initial_cc_emails_lower: data['initialcclist'] = initial_cc_emails break