aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbwarsaw <>2003-04-02 04:39:49 +0000
committerbwarsaw <>2003-04-02 04:39:49 +0000
commit409c593b01945392ee1184ad44d597897e7b5cc4 (patch)
treefce36d7c95435fe807479ac8dbb4dcfee48e7b7e
parent02089ed52ec89dc07b4c772b472f177ea16d97ba (diff)
downloadmailman2-409c593b01945392ee1184ad44d597897e7b5cc4.tar.gz
mailman2-409c593b01945392ee1184ad44d597897e7b5cc4.tar.xz
mailman2-409c593b01945392ee1184ad44d597897e7b5cc4.zip
Backport:
dequeue(): If we can't read a .db file, initialize data to the empty dictionary, since the following test expects to do a has_key() on the value. Closes SF bug #707608.
-rw-r--r--Mailman/Queue/Switchboard.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py
index 530055ad..9a254039 100644
--- a/Mailman/Queue/Switchboard.py
+++ b/Mailman/Queue/Switchboard.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2003 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
@@ -145,6 +145,7 @@ class _Switchboard:
os.unlink(dbfile)
except EnvironmentError, e:
if e.errno <> errno.ENOENT: raise
+ data = {}
# Between 2.1b4 and 2.1b5, the `rejection-notice' key in the metadata
# was renamed to `rejection_notice', since dashes in the keys are not
# supported in METAFMT_ASCII.