diff options
Diffstat (limited to 'Mailman/Commands/cmd_subscribe.py')
-rw-r--r-- | Mailman/Commands/cmd_subscribe.py | 9 |
1 files changed, 6 insertions, 3 deletions
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') |