summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 2df2f1d9e..f3420493b 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -44,8 +44,12 @@ from Mailman import Errors
def list_exists(listname):
"""Return true iff list `listname' exists."""
- return os.path.exists(
- os.path.join(mm_cfg.LIST_DATA_DIR, listname, 'config.db'))
+ # It is possible that config.db got removed erroneously, in which case we
+ # can fall back to config.db.last
+ dbfile = os.path.join(mm_cfg.LIST_DATA_DIR, listname, 'config.db')
+ lastfile = dbfile + '.last'
+ return os.path.exists(dbfile) or os.path.exists(lastfile)
+
def list_names():
@@ -56,6 +60,7 @@ def list_names():
got.append(fn)
return got
+
# a much more naive implementation than say, Emacs's fill-paragraph!
def wrap(text, column=70):