From 3df8d5182b44148bbd4b43f5474cd67b2ca699f9 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Wed, 24 May 2017 22:25:11 -0700 Subject: Ensure the held message subject is a string. --- src/mailman/app/moderator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mailman/app/moderator.py') diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py index 03028cb85..0676cb4f5 100644 --- a/src/mailman/app/moderator.py +++ b/src/mailman/app/moderator.py @@ -79,7 +79,8 @@ def hold_message(mlist, msg, msgdata=None, reason=None): msgdata['_mod_message_id'] = message_id msgdata['_mod_listid'] = mlist.list_id msgdata['_mod_sender'] = msg.sender - msgdata['_mod_subject'] = msg.get('subject', _('(no subject)')) + # The subject can sometimes be a Header instance. Stringify it. + msgdata['_mod_subject'] = str(msg.get('subject', _('(no subject)'))) msgdata['_mod_reason'] = reason msgdata['_mod_hold_date'] = now().isoformat() # Now hold this request. We'll use the message_id as the key. -- cgit v1.2.3-70-g09d2