admin.py unicode error patch (shouldn't these all be fixed?)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Invalid
|
Undecided
|
Unassigned |
Bug Description
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_
# 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(
all.
# See if the query has a regular expression
regexp = cgidata.
Logged In: YES
user_id=9622
...but I must comment that it is likely the users will enter 8859-2
ancoded local parts, and maybe I10L'ised domains (IDN) too. Mailman is
not supposed to choke and die on these. I guess...