aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2013-12-01 13:22:52 -0800
committerMark Sapiro <mark@msapiro.net>2013-12-01 13:22:52 -0800
commitb03cc278ec35db41a04a3449f9e5689385819524 (patch)
treeda2c7d3179f752741a2a5f23d2499202f6fbefc3
parentf299ca620f3f5a8d2417f8779d3a208cdee1d3c5 (diff)
downloadmailman2-b03cc278ec35db41a04a3449f9e5689385819524.tar.gz
mailman2-b03cc278ec35db41a04a3449f9e5689385819524.tar.xz
mailman2-b03cc278ec35db41a04a3449f9e5689385819524.zip
Fixed a possible TypeError in bin/sync_members introduced in 2.1.17.
Diffstat (limited to '')
-rwxr-xr-xNEWS7
-rwxr-xr-xbin/sync_members8
2 files changed, 13 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 0b939972..e12ccf64 100755
--- a/NEWS
+++ b/NEWS
@@ -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')