From 01fbc7fb4029a4cee1b95fd43df13dfdf6746206 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Thu, 2 Jan 2003 06:18:46 +0000 Subject: _do_remove(): Patch by Jon Parise to fix a bug in the stanza matching code which would delete any list with a matching prefix (i.e. "bin/rmlist foo" would also delete the stanza for "foo-one" and "foo-two"). --- Mailman/MTA/Postfix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Mailman') diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py index 24c1c7e5..84718e5f 100644 --- a/Mailman/MTA/Postfix.py +++ b/Mailman/MTA/Postfix.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 @@ -259,14 +259,14 @@ def _do_remove(mlist, textfile, virtualp): # filtering out a stanza, we're just looking for the proper begin # marker. if filteroutp: - if line.startswith(end): + if line.strip() == end: filteroutp = 0 # Discard the trailing blank line, but don't worry if # we're at the end of the file. infp.readline() # Otherwise, ignore the line else: - if line.startswith(start): + if line.strip() == start: # Filter out this stanza filteroutp = 1 else: -- cgit v1.2.3