Hi Barry & gang,
I finally figured out why my few additions to SimpleMatch.py bounce messages weren't
working. It turns out that if one of the lines in one of the previous cases matches,
but the other ones don't, the search is aborted immediately, instead of testing the
other patterns. I'm sure this is a simple fix, but I'm not fluent enough in Python
(yet) to take a stab at this. The offending code is:
state = 0
while 1:
line = msg.fp.readline()
if not line:
break
if state == 0:
for scre, ecre, acre in patterns:
if scre.search(line):
state = 1
break
elif state == 1:
mo = acre.search(line)
if mo:
addrs[mo.group('addr')] = 1
elif ecre.search(line):
break
return addrs.keys() or None
Bob
_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers