From 66dc59ab5f368b1373f34d6487d7b43ad3af6941 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 25 Jun 2010 15:39:24 -0700 Subject: Fixed an issue in admindb that could result in a KeyError and "we hit a bug" response when a moderator acts on a post that had been handled by someone else after the first moderator had retrieved it. Bug #598671. --- Mailman/Cgi/admindb.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Mailman') diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index f7654dc2..586b406d 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -780,12 +780,16 @@ def process_form(mlist, doc, cgidata): forwardaddrkey = 'forward-addr-%d' % request_id bankey = 'ban-%d' % request_id # Defaults - if mlist.GetRecordType(request_id) == HELDMSG: - msgdata = mlist.GetRecord(request_id)[5] - comment = msgdata.get('rejection_notice', - _('[No explanation given]')) - else: - comment = _('[No explanation given]') + try: + if mlist.GetRecordType(request_id) == HELDMSG: + msgdata = mlist.GetRecord(request_id)[5] + comment = msgdata.get('rejection_notice', + _('[No explanation given]')) + else: + comment = _('[No explanation given]') + except KeyError: + # Someone else must have handled this one after we got the page. + continue preserve = 0 forward = 0 forwardaddr = '' -- cgit v1.2.3