From b2d8e838a2b42e59269f346107235e0ad465cf17 Mon Sep 17 00:00:00 2001 From: Stuart Gathman <stuart@gathman.org> Date: Sat, 3 Mar 2007 19:18:57 +0000 Subject: [PATCH] Fix continuing findsrs when srs.reverse fails. --- bms.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bms.py b/bms.py index 8e52250..6413e98 100644 --- a/bms.py +++ b/bms.py @@ -1,6 +1,9 @@ #!/usr/bin/env python # A simple milter that has grown quite a bit. # $Log$ +# Revision 1.94 2007/03/03 18:46:26 customdesigned +# Improve delayed failure detection. +# # Revision 1.93 2007/02/07 23:21:26 customdesigned # Use re for auto-reply recognition. # @@ -378,8 +381,9 @@ def findsrs(fp): name,val = lastln.rstrip().split(None,1) pos = val.find('<SRS') if pos >= 0: - return srs.reverse(val[pos+1:-1]) - except: continue + end = val.find('>',pos+4) + return srs.reverse(val[pos+1:end]) + except: pass lnl = ln.lower() if lnl.startswith('action:'): if lnl.split()[-1] != 'failed': break -- GitLab