diff options
| author | bwarsaw | 2001-08-16 06:33:48 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-08-16 06:33:48 +0000 |
| commit | f880b7e91270dabcbdfa0cbff1c91dcf8ef2cc63 (patch) | |
| tree | 8f1aa3669a7e167cdb1b821f7df2e5161de3b5ca | |
| parent | 1002368e89d31e925e31ff2959e7f4c447d663c1 (diff) | |
| download | mailman-f880b7e91270dabcbdfa0cbff1c91dcf8ef2cc63.tar.gz mailman-f880b7e91270dabcbdfa0cbff1c91dcf8ef2cc63.tar.zst mailman-f880b7e91270dabcbdfa0cbff1c91dcf8ef2cc63.zip | |
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).
| -rw-r--r-- | Mailman/Pending.py | 5 |
1 files changed, 5 insertions, 0 deletions
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: |
