Merge ~ubuntu-release/britney/+git/britney2-ubuntu:email-direct-upload-sponsor into ~ubuntu-release/britney/+git/britney2-ubuntu:master
Proposed by
Iain Lane
on 2017-03-09
| Status: | Merged |
|---|---|
| Merged at revision: | 7cc72bf2d65dcd609539ac89ae8d19f55e37e1dd |
| Proposed branch: | ~ubuntu-release/britney/+git/britney2-ubuntu:email-direct-upload-sponsor |
| Merge into: | ~ubuntu-release/britney/+git/britney2-ubuntu:master |
| Diff against target: |
37 lines (+9/-1) 2 files modified
britney2/policies/email.py (+8/-1) tests/test_email.py (+1/-0) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Robert Bruce Park | 2017-03-09 | Pending | |
| Ubuntu Release Team | 2017-03-09 | Pending | |
|
Review via email:
|
|||
Description of the Change
I noticed that the testsuite for a sponsored direct upload emails the sponsor only.
I think it should email both the sponsor and the sponsoree. This change fixes that and doesn't regress any of the other testcases - could you see if it's sane please?
To post a comment you must log in.
| Robert Bruce Park (robru) wrote : | # |
| Iain Lane (laney) wrote : | # |
Thanks - I didn't know that nested functions are bad for performance if called a lot. I'll eliminate those. I don't necessarily agree that it's clearer, but I'll fix it as you suggest.
| Iain Lane (laney) wrote : | # |
I fixed the comments and merged a while ago, sorry for forgetting to close this MP

(some comments inline)
A cleaner-looking and faster solution would be:
people = {
source[ 'package_ signer_ link'],
source[ 'sponsor_ link'],
source[ 'creator_ link'], 'package_ signer_ link'] in BOTS 'creator_ link'] and not source[ 'sponsor_ link'] add(source[ 'package_ creator_ link'])
} - {None} - BOTS
bileto = source[
regular = not source[
if bileto or regular:
people.
return people