Merge lp:~brian-murray/ubuntu-archive-tools/email-from-changes-file into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 893
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/email-from-changes-file
Merge into: lp:ubuntu-archive-tools
Diff against target: 34 lines (+13/-3)
1 file modified
phased-updater (+13/-3)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/email-from-changes-file
Reviewer Review Type Date Requested Status
Ubuntu Package Archive Administrators Pending
Review via email: mp+233424@code.launchpad.net

Description of the change

By using the changes file from Launchpad will be able to find an email address for uploaders who have chosen to make their email address private in Launchpad, and subsequently notify them about regressions. This will fix issues like the following:

2014-06-20 17:53:48,152 - INFO - https://launchpad.net/~serge-hallyn has hidden their email addresses
2014-06-20 17:53:48,152 - INFO - no signer email address for trusty cgmanager 0.24-0ubuntu7
2014-06-20 17:53:48,488 - INFO - https://launchpad.net/~arges has hidden their email addresses
2014-06-20 17:53:48,489 - INFO - no signer email address for trusty open-vm-tools 2:9.4.0-1280544-5ubuntu6.2

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phased-updater'
2--- phased-updater 2014-06-20 19:18:35 +0000
3+++ phased-updater 2014-09-04 20:34:28 +0000
4@@ -35,6 +35,7 @@
5 import time
6
7 from collections import defaultdict, OrderedDict
8+from email import utils
9 from optparse import OptionParser
10
11 import lputils
12@@ -251,10 +252,19 @@
13 pkg = spph.source_package_name
14 version = spph.source_package_version
15 if not signer_email:
16- logging.info('no signer email address for %s %s %s' %
17+ # if we can't determine their email use the changes file
18+ changes_file_url = spph.changesFileUrl()
19+ changes_file = urlopen(changes_file_url)
20+ for line in changes_file.readlines():
21+ line = line.strip()
22+ if line.startswith('Changed-By:'):
23+ changer = line.lstrip('Changed-By: ')
24+ signer_name, signer_email = utils.parseaddr(changer.strip())
25+ break
26+ logging.info("Used changes file to find email for %s %s %s" %
27 (rname, pkg, version))
28- continue
29- signer_name = signer.name
30+ else:
31+ signer_name = signer.name
32 changer = spph.package_creator
33 if 'buckets' in spph_buckets[rname][spph]:
34 # see if they've been emailed about the bucket before

Subscribers

People subscribed via source and target branches