From 409c593b01945392ee1184ad44d597897e7b5cc4 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Wed, 2 Apr 2003 04:39:49 +0000 Subject: 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. --- Mailman/Queue/Switchboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Mailman/Queue') 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. -- cgit v1.2.3