From 54fed43e6c37ce9c9c06bb75b0c3716d24871d8d Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Mon, 24 Jan 2005 00:16:54 +0000 Subject: Non-MIME sender realname should not be treated. --- Mailman/Commands/cmd_subscribe.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Mailman/Commands') diff --git a/Mailman/Commands/cmd_subscribe.py b/Mailman/Commands/cmd_subscribe.py index 1a5048d6..2b3304b4 100644 --- a/Mailman/Commands/cmd_subscribe.py +++ b/Mailman/Commands/cmd_subscribe.py @@ -84,9 +84,12 @@ def process(res, args): res.results.append(_('No valid address found to subscribe')) return STOP # Watch for encoded names - h = make_header(decode_header(realname)) - # BAW: in Python 2.2, use just unicode(h) - realname = h.__unicode__() + try: + h = make_header(decode_header(realname)) + # BAW: in Python 2.2, use just unicode(h) + realname = h.__unicode__() + except UnicodeDecodeError: + realname = u'' # Coerce to byte string if uh contains only ascii try: realname = realname.encode('us-ascii') -- cgit v1.2.3