From e0ac956775f77115d22b985b3f8a80db3417757e Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 20 Dec 2000 21:33:28 +0000 Subject: process(): Get rid of the string module, in favor of string methods. filterfunc(): Get rid of this too, since we can use a list comprehension instead (which I think is just as clear). --- Mailman/Handlers/Approve.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Mailman/Handlers/Approve.py b/Mailman/Handlers/Approve.py index ee96bce0b..95763df88 100644 --- a/Mailman/Handlers/Approve.py +++ b/Mailman/Handlers/Approve.py @@ -23,7 +23,6 @@ not tested by this module. """ -import string import HandlerAPI from Mailman import mm_cfg from Mailman import Errors @@ -49,11 +48,7 @@ def process(mlist, msg, msgdata): # determination. msgdata['approved'] = 1 # has this message already been posted to this list? - beentheres = map(filterfunc, msg.getallmatchingheaders('x-beenthere')) + beentheres = [s.split(':', 1)[1].strip() for s in + msg.getallmatchingheaders('x-beenthere')] if mlist.GetListEmail() in beentheres: raise LoopError - - - -def filterfunc(s): - return string.strip(string.split(s, ': ')[1]) -- cgit v1.3.1