aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2016-05-17 12:33:14 -0700
committerMark Sapiro <mark@msapiro.net>2016-05-17 12:33:14 -0700
commit686cd52aa51e7a01a321ef83581b75c3de0efc55 (patch)
treeb8106ac65eb010a07384255390a4fa77c3ee7fc8
parent631b834dd33fd65bf3c6e901980fb96c13a8d153 (diff)
downloadmailman2-686cd52aa51e7a01a321ef83581b75c3de0efc55.tar.gz
mailman2-686cd52aa51e7a01a321ef83581b75c3de0efc55.tar.xz
mailman2-686cd52aa51e7a01a321ef83581b75c3de0efc55.zip
Catch MMUnknownListError in case list is removed after listing names.
-rw-r--r--Mailman/Cgi/admin.py6
-rw-r--r--Mailman/Cgi/listinfo.py8
-rw-r--r--NEWS4
-rw-r--r--bin/list_lists6
4 files changed, 20 insertions, 4 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py
index 370a2507..a939c88a 100644
--- a/Mailman/Cgi/admin.py
+++ b/Mailman/Cgi/admin.py
@@ -260,7 +260,11 @@ def admin_overview(msg=''):
listnames.sort()
for name in listnames:
- mlist = MailList.MailList(name, lock=0)
+ try:
+ mlist = MailList.MailList(name, lock=0)
+ except Errors.MMUnknownListError:
+ # The list could have been deleted by another process.
+ continue
if mlist.advertised:
if mm_cfg.VIRTUAL_HOST_OVERVIEW and (
mlist.web_page_url.find('/%s/' % hostname) == -1 and
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py
index c13fdb26..b07e2201 100644
--- a/Mailman/Cgi/listinfo.py
+++ b/Mailman/Cgi/listinfo.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2015 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -88,7 +88,11 @@ def listinfo_overview(msg=''):
listnames.sort()
for name in listnames:
- mlist = MailList.MailList(name, lock=0)
+ try:
+ mlist = MailList.MailList(name, lock=0)
+ except Errors.MMUnknownListError:
+ # The list could have been deleted by another process.
+ continue
if mlist.advertised:
if mm_cfg.VIRTUAL_HOST_OVERVIEW and (
mlist.web_page_url.find('/%s/' % hostname) == -1 and
diff --git a/NEWS b/NEWS
index 10417850..5eda4c28 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,10 @@ Here is a history of user visible changes to Mailman.
Bug fixes and other patches
+ - In rare circumstances a list can be removed while the admin or listinfo
+ CGI or bin/list_lists is running causing an uncaught MMUnknownListError
+ to be thrown. The exception is now caught and handled. (LP: #1582532)
+
- Set the Date: header in the wrapper message when from_is_list or
dmarc_moderation_action is Wrap Message. (LP: #1581215)
diff --git a/bin/list_lists b/bin/list_lists
index 9c941958..4a546885 100644
--- a/bin/list_lists
+++ b/bin/list_lists
@@ -97,7 +97,11 @@ def main():
mlists = []
longest = 0
for n in names:
- mlist = MailList.MailList(n, lock=0)
+ try:
+ mlist = MailList.MailList(n, lock=0)
+ except Errors.MMUnknownListError:
+ # The list could have been deleted by another process.
+ continue
if advertised and not mlist.advertised:
continue
if public and mlist.archive_private: