From 8305e989c7a3747c0656bfa8def24b2d792be807 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Fri, 22 Nov 2019 12:54:14 +0100 Subject: [PATCH] consistently normalize email addresses as keys Otherwise, this could make looking up user names in the inverted_user_cache dictionary to fail. Signed-off-by: Nils Philippsen --- distgit_bugzilla_sync/script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index 2d627fc..97b2718 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -213,14 +213,14 @@ class BugzillaProxy: return self.user_cache[username] = { 'bugzilla_email': bz_email} - self.inverted_user_cache[bz_email] = username else: person = self.fas.person_by_username(username) bz_email = person.get('bugzilla_email', None) if bz_email is None: return self.user_cache[username] = {'bugzilla_email': bz_email} - self.inverted_user_cache[bz_email] = username + bz_email = bz_email.lower() + self.inverted_user_cache[bz_email] = username return bz_email def add_edit_component(self, package, collection, owner, description=None,