------------------------------------------------------------
revno: 1288
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Tue 2013-10-22 11:17:53 -0700
message:
Fixed a possible UnicodeDecodeError in bin/sync_members.
modified:
NEWS
bin/sync_members
--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2
Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'NEWS'
--- NEWS 2013-10-18 22:52:00 +0000
+++ NEWS 2013-10-22 18:17:53 +0000
@@ -53,6 +53,8 @@
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)
=== modified file 'bin/sync_members'
--- bin/sync_members 2008-02-29 17:47:36 +0000
+++ bin/sync_members 2013-10-22 18:17:53 +0000
@@ -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 @@
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 @@
# 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')
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org