summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw2000-04-09 21:03:31 +0000
committerbwarsaw2000-04-09 21:03:31 +0000
commit3811943cc2e7406078b45f432230718ca53dde37 (patch)
tree4a628f1bd091b47b9b6b460bc40e08774b0350bc /Mailman/Utils.py
parent2a3f5590d0753e1ac786f3923d8f4fa80e185885 (diff)
downloadmailman-3811943cc2e7406078b45f432230718ca53dde37.tar.gz
mailman-3811943cc2e7406078b45f432230718ca53dde37.tar.zst
mailman-3811943cc2e7406078b45f432230718ca53dde37.zip
list_names(): Slightly more efficient implementation.
map_maillists(): Slight more "standard" use of import.
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index daeeed1f7..2df2f1d9e 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -52,9 +52,8 @@ def list_names():
"""Return the names of all lists in default list directory."""
got = []
for fn in os.listdir(mm_cfg.LIST_DATA_DIR):
- if not list_exists(fn):
- continue
- got.append(fn)
+ if list_exists(fn):
+ got.append(fn)
return got
@@ -420,14 +419,14 @@ def map_maillists(func, names=None, unlock=None, verbose=0):
Optional arg verbose says to print list name as it's about to be
instantiated, CR when instantiation is complete, and result of
application as it shows."""
- from Mailman.MailList import MailList
+ from Mailman import MailList
if names == None:
names = list_names()
got = []
for i in names:
if verbose:
print i,
- l = MailList(i)
+ l = MailList.MailList(i)
if verbose:
print
if unlock and l.Locked():