mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-16 04:51:32 +00:00
Stop returning None.
This commit is contained in:
parent
9a32ef781f
commit
e7181465a8
@ -64,14 +64,14 @@ def person_chooser(source):
|
|||||||
|
|
||||||
def address_chooser(addresses):
|
def address_chooser(addresses):
|
||||||
"""Prefer @ubuntu and @canonical addresses."""
|
"""Prefer @ubuntu and @canonical addresses."""
|
||||||
first = None
|
first = ''
|
||||||
canonical = None
|
canonical = ''
|
||||||
for address in addresses:
|
for address in addresses:
|
||||||
if address.endswith('@ubuntu.com'):
|
if address.endswith('@ubuntu.com'):
|
||||||
return address
|
return address
|
||||||
if address.endswith('@canonical.com'):
|
if address.endswith('@canonical.com'):
|
||||||
canonical = address
|
canonical = address
|
||||||
if first is None:
|
if not first:
|
||||||
first = address
|
first = address
|
||||||
return canonical or first
|
return canonical or first
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ class EmailPolicy(BasePolicy, Rest):
|
|||||||
# which is expected to happen when bileto runs britney.
|
# which is expected to happen when bileto runs britney.
|
||||||
except IndexError:
|
except IndexError:
|
||||||
self.log('Email getPublishedSources IndexError (%s %s)' % (pkg, version))
|
self.log('Email getPublishedSources IndexError (%s %s)' % (pkg, version))
|
||||||
return None
|
return []
|
||||||
return self.scrape_gpg_emails(person_chooser(source))
|
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):
|
def apply_policy_impl(self, email_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user