diff options
| author | Robert Bruce Park <robert.park@canonical.com> | 2017-03-09 18:39:19 (GMT) |
|---|---|---|
| committer | Robert Bruce Park <robert.park@canonical.com> | 2017-03-09 19:04:12 (GMT) |
| commit | e7181465a8f67e767f4eda5d73c78b1ba9b93341 (patch) | |
| tree | fd2a8bdc9df40ac2459ede071649f11730535c7d | |
| parent | 9a32ef781fc812bb7cf24c293233cabc2a4c7240 (diff) | |
Stop returning None.
| -rw-r--r-- | britney2/policies/email.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/britney2/policies/email.py b/britney2/policies/email.py index f335064..6714347 100644 --- a/britney2/policies/email.py +++ b/britney2/policies/email.py @@ -64,14 +64,14 @@ def person_chooser(source): def address_chooser(addresses): """Prefer @ubuntu and @canonical addresses.""" - first = None - canonical = None + first = '' + canonical = '' for address in addresses: if address.endswith('@ubuntu.com'): return address if address.endswith('@canonical.com'): canonical = address - if first is None: + if not first: first = address return canonical or first @@ -148,7 +148,7 @@ class EmailPolicy(BasePolicy, Rest): # which is expected to happen when bileto runs britney. except IndexError: self.log('Email getPublishedSources IndexError (%s %s)' % (pkg, version)) - return None + return [] return self.scrape_gpg_emails(person_chooser(source)) def apply_policy_impl(self, email_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse): |
