~raj-abhilash1/mailman/alembic-fix

« back to all changes in this revision

Viewing changes to src/mailman/handlers/to_digest.py

  • Committer: Barry Warsaw
  • Date: 2014-11-29 22:21:50 UTC
  • mfrom: (7264.3.1 mailman)
  • Revision ID: barry@list.org-20141129222150-wyw1t08d0qlrqqap
 * Fix Unicode errors when a message being added to the digest has non-ascii
   characters in its payload, but no Content-Type header defining a charset.
   Given by Aurélien Bompard.  (LP: #1170347)

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
        mailbox_path = os.path.join(mlist.data_path, 'digest.mmdf')
56
56
        # Lock the mailbox and append the message.
57
57
        with Mailbox(mailbox_path, create=True) as mbox:
58
 
            mbox.add(msg)
 
58
            mbox.add(msg.as_string())
59
59
        # Calculate the current size of the mailbox file.  This will not tell
60
60
        # us exactly how big the resulting MIME and rfc1153 digest will
61
61
        # actually be, but it's the most easily available metric to decide