summaryrefslogtreecommitdiff
path: root/src/mailman/app/moderator.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/app/moderator.py')
-rw-r--r--src/mailman/app/moderator.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py
index 78332b84a..105e53617 100644
--- a/src/mailman/app/moderator.py
+++ b/src/mailman/app/moderator.py
@@ -86,9 +86,9 @@ def hold_message(mlist, msg, msgdata=None, reason=None):
# Message-ID header.
message_id = msg.get('message-id')
if message_id is None:
- msg['Message-ID'] = message_id = unicode(make_msgid())
- assert isinstance(message_id, unicode), (
- 'Message-ID is not a unicode: %s' % message_id)
+ msg['Message-ID'] = message_id = make_msgid().decode('ascii')
+ 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.