~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/adapters/notification.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-25 23:03:39 UTC
  • mfrom: (13506.3.4 sync-crash-bug-815965)
  • Revision ID: launchpad@pqm.canonical.com-20110725230339-2pdxrhopwxlcvyz9
[r=julian-edwards][bug=815965] Make assemble_body in notifications
        cope with lack of a preferred email address on the changed-by person

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
    if distroseries.changeslist:
282
282
        information['ANNOUNCE'] = "Announcing to %s" % (
283
283
            distroseries.changeslist)
284
 
    if blamer is not None and blamer != email_to_person(changedby):
 
284
    try:
 
285
        changedby_person = email_to_person(changedby)
 
286
    except ParseMaintError:
 
287
        # Some syncs (e.g. from Debian) will involve packages whose
 
288
        # changed-by person was auto-created in LP and hence does not
 
289
        # have a preferred email address set.
 
290
        changedby_person = None
 
291
    if blamer is not None and blamer != changedby_person:
285
292
        signer_signature = person_to_email(blamer)
286
293
        if signer_signature != changedby:
287
294
            information['SIGNER'] = '\nSigned-By: %s' % signer_signature