------------------------------------------------------------ revno: 1651 fixes bug: https://launchpad.net/bugs/1582532 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.1 timestamp: Tue 2016-05-17 12:33:14 -0700 message: Catch MMUnknownListError in case list is removed after listing names. modified: Mailman/Cgi/admin.py Mailman/Cgi/listinfo.py NEWS bin/list_lists
-- lp:mailman/2.1 https://code.launchpad.net/~mailman-coders/mailman/2.1 Your team Mailman Checkins is subscribed to branch lp:mailman/2.1. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Cgi/admin.py' --- Mailman/Cgi/admin.py 2015-04-13 22:17:02 +0000 +++ Mailman/Cgi/admin.py 2016-05-17 19:33:14 +0000 @@ -260,7 +260,11 @@ 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 === modified file 'Mailman/Cgi/listinfo.py' --- Mailman/Cgi/listinfo.py 2015-06-23 19:53:50 +0000 +++ Mailman/Cgi/listinfo.py 2016-05-17 19:33:14 +0000 @@ -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 @@ 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 === modified file 'NEWS' --- NEWS 2016-05-13 16:27:12 +0000 +++ NEWS 2016-05-17 19:33:14 +0000 @@ -25,6 +25,10 @@ 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) === modified file 'bin/list_lists' --- bin/list_lists 2016-02-27 23:21:12 +0000 +++ bin/list_lists 2016-05-17 19:33:14 +0000 @@ -97,7 +97,11 @@ 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:
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org