8 Nov
2001
8 Nov
'01
5:42 a.m.
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
8453
Age (days ago)
8453
Last active (days ago)
0 comments
1 participants
participants (1)
-
Bob Puff@NLE