summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorbwarsaw2003-03-13 15:54:39 +0000
committerbwarsaw2003-03-13 15:54:39 +0000
commite91cf963e2fa42c6fedcc8f2df774bc8bb7936d2 (patch)
treed121c8accd0ed2099edb8c12ab33062d65991dd3 /bin
parent978fc03fe919724c27c49e92cde0e11bb8f122fb (diff)
downloadmailman-e91cf963e2fa42c6fedcc8f2df774bc8bb7936d2.tar.gz
mailman-e91cf963e2fa42c6fedcc8f2df774bc8bb7936d2.tar.zst
mailman-e91cf963e2fa42c6fedcc8f2df774bc8bb7936d2.zip
safe(): Fix typos.
main(): Fix dumb coding mistakes so name is always a string.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/list_members14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/list_members b/bin/list_members
index 3306b2e94..b4fdbb27e 100755
--- a/bin/list_members
+++ b/bin/list_members
@@ -95,12 +95,12 @@ def usage(code, msg=''):
-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 @@ def main():
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 @@ def main():
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