summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw2002-03-05 16:20:15 +0000
committerbwarsaw2002-03-05 16:20:15 +0000
commit16153901f34415323c4134d13ef6ea8565509686 (patch)
treec279ff65287124a23806f1f215a0b4bc85492db6 /Mailman/Utils.py
parent297bca1d7a7028ad528b016f53a0dd9e84ffe529 (diff)
downloadmailman-16153901f34415323c4134d13ef6ea8565509686.tar.gz
mailman-16153901f34415323c4134d13ef6ea8565509686.tar.zst
mailman-16153901f34415323c4134d13ef6ea8565509686.zip
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 20f5c69df..a896f4f4b 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -43,6 +43,7 @@ except ImportError:
from Mailman import mm_cfg
from Mailman import Errors
+from Mailman import Site
from Mailman.SafeDict import SafeDict
EMPTYSTRING = ''
@@ -65,8 +66,9 @@ def list_exists(listname):
#
# The former two are for 2.1alpha3 and beyond, while the latter two are
# for all earlier versions.
+ basepath = Site.get_listpath(listname)
for ext in ('.pck', '.pck.last', '.db', '.db.last'):
- dbfile = os.path.join(mm_cfg.LIST_DATA_DIR, listname, 'config' + ext)
+ dbfile = os.path.join(basepath, 'config' + ext)
if os.path.exists(dbfile):
return 1
return 0
@@ -74,11 +76,8 @@ def list_exists(listname):
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 list_exists(fn):
- got.append(fn)
- return got
+ # We don't currently support separate listings of virtual domains
+ return Site.get_listnames()