diff options
author | Mark Sapiro <mark@msapiro.net> | 2013-10-22 11:16:35 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2013-10-22 11:16:35 -0700 |
commit | c2f599fd9b708faf45d8dd621cdd89cc814f60d5 (patch) | |
tree | 1a66f510506b20937de9ab7d0f217ff1546b1e9a | |
parent | f46599dded26bad36be5a89bd26d5ea1a5ca95ab (diff) | |
download | mailman2-c2f599fd9b708faf45d8dd621cdd89cc814f60d5.tar.gz mailman2-c2f599fd9b708faf45d8dd621cdd89cc814f60d5.tar.xz mailman2-c2f599fd9b708faf45d8dd621cdd89cc814f60d5.zip |
Fixed a possible UnicodeDecodeError in bin/sync_members.
-rwxr-xr-x | NEWS | 2 | ||||
-rwxr-xr-x | bin/sync_members | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -9,6 +9,8 @@ Here is a history of user visible changes to Mailman. Bug Fixes and other patches + - Fixed a possible UnicodeDecodeError in bin/sync_members. (LP: #1243343) + - Fixed Makefile to not include $DESTDIR in paths compiled into .pyc files for traceback purposes. (LP: #1241770) diff --git a/bin/sync_members b/bin/sync_members index 13d0b2b0..58262841 100755 --- a/bin/sync_members +++ b/bin/sync_members @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2013 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -256,6 +256,8 @@ def main(): try: if not dryrun: mlist.ApprovedAddMember(userdesc, welcome, notifyadmin) + # Avoid UnicodeError if name can't be decoded + name = unicode(name, errors='replace').encode(enc, 'replace') s = email.Utils.formataddr((name, addr)).encode(enc, 'replace') print _('Added : %(s)s') except Errors.MMAlreadyAMember: @@ -276,6 +278,8 @@ def main(): # reasons is in the database. Use a lower level remove to # get rid of this member's entry mlist.removeMember(addr) + # Avoid UnicodeError if name can't be decoded + name = unicode(name, errors='replace').encode(enc, 'replace') s = email.Utils.formataddr((name, addr)).encode(enc, 'replace') print _('Removed: %(s)s') |