From f880b7e91270dabcbdfa0cbff1c91dcf8ef2cc63 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 16 Aug 2001 06:33:48 +0000 Subject: confirm(): If we're purging this cookie, we should remove its entry in the evictions dictionary too. _save(): Go through and delete any evictions keys which don't appear in the pending dictionary (i.e. we're cleaning up after ourselves due to the above bug). --- Mailman/Pending.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Mailman/Pending.py b/Mailman/Pending.py index c5be1e3dc..bbd7bf0ef 100644 --- a/Mailman/Pending.py +++ b/Mailman/Pending.py @@ -98,6 +98,7 @@ def confirm(cookie, expunge=1): # Remove the entry from the database if expunge: del db[cookie] + del db['evictions'][cookie] _save(db) return content finally: @@ -128,6 +129,10 @@ def _save(db): # The entry is stale, so remove it. del db[cookie] del evictions[cookie] + # Clean out any bogus eviction entries. + for cookie in evictions.keys(): + if not db.has_key(cookie): + del evictions[cookie] db['version'] = mm_cfg.PENDING_FILE_SCHEMA_VERSION omask = os.umask(007) try: -- cgit v1.3.1