summaryrefslogtreecommitdiff
path: root/modules/maillist.py
diff options
context:
space:
mode:
authormailman1998-02-21 19:58:31 +0000
committermailman1998-02-21 19:58:31 +0000
commit5947deaf34810d21c3a40d4f372244d1ed9e48a6 (patch)
tree7cc78cd116eba634b1d7d5286122332d8bec116b /modules/maillist.py
parent1ac8457c8c572a6b105b9826c6b9cc49ca470663 (diff)
downloadmailman-5947deaf34810d21c3a40d4f372244d1ed9e48a6.tar.gz
mailman-5947deaf34810d21c3a40d4f372244d1ed9e48a6.tar.zst
mailman-5947deaf34810d21c3a40d4f372244d1ed9e48a6.zip
Added all_listpaths to easily get the paths to all maillists situated
in the default lists directory. Used by new version of archive trigger in cron/archive.
Diffstat (limited to 'modules/maillist.py')
-rw-r--r--modules/maillist.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/maillist.py b/modules/maillist.py
index cf8cb990f..f60eb7eff 100644
--- a/modules/maillist.py
+++ b/modules/maillist.py
@@ -465,3 +465,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
self._lock_file.lock('u')
self._lock_file.close()
self._lock_file = None
+
+def all_listpaths():
+ """Return the paths to all lists in default list directory."""
+ got = []
+ for prospect in os.listdir(mm_cfg.LIST_DATA_DIR):
+ it = os.path.join(mm_cfg.LIST_DATA_DIR, prospect)
+ if os.path.isdir(it):
+ got.append(it)
+ return got
+