diff options
-rwxr-xr-x | NEWS | 7 | ||||
-rwxr-xr-x | bin/sync_members | 8 |
2 files changed, 13 insertions, 2 deletions
@@ -5,6 +5,13 @@ Copyright (C) 1998-2011 by the Free Software Foundation, Inc. Here is a history of user visible changes to Mailman. +2.1.18 (xx-xxx-xxxx) + + Bug Fixes and other patches + + - Fixed a possible TypeError in bin/sync_members introduced in 2.1.17. + (LP: #1243343) + 2.1.17 (23-Nov-2013) New Features diff --git a/bin/sync_members b/bin/sync_members index 58262841..0c860d25 100755 --- a/bin/sync_members +++ b/bin/sync_members @@ -257,7 +257,9 @@ def main(): if not dryrun: mlist.ApprovedAddMember(userdesc, welcome, notifyadmin) # Avoid UnicodeError if name can't be decoded - name = unicode(name, errors='replace').encode(enc, 'replace') + if isinstance(name, str): + name = unicode(name, errors='replace') + name = name.encode(enc, 'replace') s = email.Utils.formataddr((name, addr)).encode(enc, 'replace') print _('Added : %(s)s') except Errors.MMAlreadyAMember: @@ -279,7 +281,9 @@ def main(): # 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') + if isinstance(name, str): + name = unicode(name, errors='replace') + name = name.encode(enc, 'replace') s = email.Utils.formataddr((name, addr)).encode(enc, 'replace') print _('Removed: %(s)s') |