Apply 74_admin_non-ascii_emails.patch
authorMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:33:01 +0000 (20:33 -0400)
committerMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:33:01 +0000 (20:33 -0400)
Mailman/Cgi/admin.py

index f70a072..cab86bb 100644 (file)
@@ -866,7 +866,12 @@ def membership_options(mlist, subcat, cgidata, doc, form):
     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.sort(lambda x, y: cmp(x.lower(), y.lower()))
     # See if the query has a regular expression
     regexp = cgidata.getvalue('findmember', '').strip()