From: Raphaël Barrois Date: Thu, 17 Mar 2011 21:43:22 +0000 (+0100) Subject: Improve previous fix: don't crash on non-latin1 chars. X-Git-Tag: xorg/1.1.0~1^2 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=9896b9cfef14befaef878e616f47b29cd6c27915;p=platal.git Improve previous fix: don't crash on non-latin1 chars. Signed-off-by: Raphaël Barrois --- diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index 33017d0..0668daa 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -575,7 +575,7 @@ def handle_request(userdesc, perms, mlist, id, value, comment): # Mailman will use internally # LC_DESCRIPTIONS is a dict of lang => (name, charset, direction) tuples. encoding = mm_cfg.LC_DESCRIPTIONS['fr'][1] - comment = comment.encode(encoding) + comment = comment.encode(encoding, 'replace') mlist.HandleRequest(int(id), int(value), comment) return 1