diff options
| author | Barry Warsaw | 2014-12-22 13:40:30 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-12-22 13:40:30 -0500 |
| commit | 7d996dfa54e35053fb3518f29cd5368f88c085b8 (patch) | |
| tree | b4111954c2cd95578f92240686b8b23cd243a1a7 /src/mailman/app | |
| parent | 10b4557d9b0de2cb0ce40032e5b633165d6b9139 (diff) | |
| parent | 4173e7219271fa6ffc336c6a6d16b041cc62df12 (diff) | |
| download | mailman-7d996dfa54e35053fb3518f29cd5368f88c085b8.tar.gz mailman-7d996dfa54e35053fb3518f29cd5368f88c085b8.tar.zst mailman-7d996dfa54e35053fb3518f29cd5368f88c085b8.zip | |
Trunk merge.
Diffstat (limited to 'src/mailman/app')
| -rw-r--r-- | src/mailman/app/bounces.py | 5 | ||||
| -rw-r--r-- | src/mailman/app/moderator.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mailman/app/bounces.py b/src/mailman/app/bounces.py index 0f39e611e..4f3fd187a 100644 --- a/src/mailman/app/bounces.py +++ b/src/mailman/app/bounces.py @@ -200,10 +200,13 @@ def send_probe(member, msg): optionsurl=member.options_url, owneraddr=mlist.owner_address, ) + message_id = msg['message-id'] + if isinstance(message_id, bytes): + message_id = message_id.decode('ascii') pendable = _ProbePendable( # We can only pend unicodes. member_id=member.member_id.hex, - message_id=msg['message-id'], + message_id=message_id, ) token = getUtility(IPendings).add(pendable) mailbox, domain_parts = split_email(mlist.bounces_address) diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py index dc5cabd0a..e5fbc9044 100644 --- a/src/mailman/app/moderator.py +++ b/src/mailman/app/moderator.py @@ -31,7 +31,6 @@ __all__ = [ ] -import six import time import logging @@ -87,8 +86,8 @@ def hold_message(mlist, msg, msgdata=None, reason=None): message_id = msg.get('message-id') if message_id is None: msg['Message-ID'] = message_id = make_msgid() - assert isinstance(message_id, six.text_type), ( - 'Message-ID is not a unicode: %s' % message_id) + elif isinstance(message_id, bytes): + message_id = message_id.decode('ascii') getUtility(IMessageStore).add(msg) # Prepare the message metadata with some extra information needed only by # the moderation interface. |
