diff options
author | tkikuchi <> | 2005-01-24 00:16:54 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-01-24 00:16:54 +0000 |
commit | 54fed43e6c37ce9c9c06bb75b0c3716d24871d8d (patch) | |
tree | 20c886b5e438e60421753a7e9181e5694c9d9174 /Mailman/Commands | |
parent | 771c1eef6a3905ab28d424a07611e010df33015e (diff) | |
download | mailman2-54fed43e6c37ce9c9c06bb75b0c3716d24871d8d.tar.gz mailman2-54fed43e6c37ce9c9c06bb75b0c3716d24871d8d.tar.xz mailman2-54fed43e6c37ce9c9c06bb75b0c3716d24871d8d.zip |
Non-MIME sender realname should not be treated.
Diffstat (limited to 'Mailman/Commands')
-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') |