[ mailman-Patches-1182245 ] admin.py unicode error patch (shouldn't
these all be fixed?)
SourceForge.net
noreply at sourceforge.net
Wed Apr 13 16:20:10 CEST 2005
Patches item #1182245, was opened at 2005-04-13 16:20
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=1182245&group_id=103
Category: internationalization
Group: Mailman 2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: peter gervai (grin)
Assigned to: Nobody/Anonymous (nobody)
Summary: admin.py unicode error patch (shouldn't these all be fixed?)
Initial Comment:
upgraded from 2.0 to 2.1.xx. mailman died some smaller deaths,
and a larger one, biting customer with 8859-2 email addresses,
which are valid, btw.
*this is not a proper fix* (I guess)
*a am not a python programmer* (I am pretty sure about this one)
however, it solves the bug and It Works(tm).
--- admin.py-orig Wed Apr 13 15:44:33 2005
+++ admin.py Wed Apr 13 16:14:27 2005
@@ -867,7 +867,13 @@
chunksz = mlist.admin_member_chunksize
# The email addresses had /better/ be ASCII, but might be
encoded in the
# database as Unicodes.
- all = [_m.encode() for _m in mlist.getMembers()]
+ all = []
+ for _m in mlist.getMembers():
+ try:
+ all.append( _m.encode() )
+ except:
+ all.append( _m )
+ #all = [_m.encode('utf-8','ignore') for _m in mlist.getMembers()]
all.sort(lambda x, y: cmp(x.lower(), y.lower()))
# See if the query has a regular expression
regexp = cgidata.getvalue('findmember', '').strip()
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=1182245&group_id=103
More information about the Mailman-coders
mailing list