Update of /cvsroot/mailman/mailman/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv12824

Modified Files:
        list_members 
Log Message:
safe(): Fix typos.

main(): Fix dumb coding mistakes so name is always a string.


Index: list_members
===================================================================
RCS file: /cvsroot/mailman/mailman/bin/list_members,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -d -r2.13 -r2.14
--- list_members        11 Mar 2003 18:18:53 -0000      2.13
+++ list_members        13 Mar 2003 15:54:39 -0000      2.14
@@ -95,12 +95,12 @@
 
 
 
-def safe(addr):
-    if addr is None:
+def safe(s):
+    if not s:
         return ''
-    if isinstance(addr, UnicodeType):
-        return addr.encode(ENC, 'replace')
-    return unicode(addr, ENC, 'replace').encode(ENC, 'replace')
+    if isinstance(s, UnicodeType):
+        return s.encode(ENC, 'replace')
+    return unicode(s, ENC, 'replace').encode(ENC, 'replace')
 
 
 
@@ -211,7 +211,7 @@
     if regular:
         rmembers.sort()
         for addr in rmembers:
-            name = fullnames and mlist.getMemberName(addr)
+            name = fullnames and mlist.getMemberName(addr) or ''
             # Filter out nomails
             if nomail and not whymatches(mlist, addr, why):
                 continue
@@ -219,7 +219,7 @@
     if digest:
         dmembers.sort()
         for addr in dmembers:
-            name = fullnames and mlist.getMemberName(addr)
+            name = fullnames and mlist.getMemberName(addr) or ''
             # Filter out nomails
             if nomail and not whymatches(mlist, addr, why):
                 continue



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to