Fix continuing findsrs when srs.reverse fails.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# A simple milter that has grown quite a bit.
|
# A simple milter that has grown quite a bit.
|
||||||
# $Log$
|
# $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
|
# Revision 1.93 2007/02/07 23:21:26 customdesigned
|
||||||
# Use re for auto-reply recognition.
|
# Use re for auto-reply recognition.
|
||||||
#
|
#
|
||||||
@@ -378,8 +381,9 @@ def findsrs(fp):
|
|||||||
name,val = lastln.rstrip().split(None,1)
|
name,val = lastln.rstrip().split(None,1)
|
||||||
pos = val.find('<SRS')
|
pos = val.find('<SRS')
|
||||||
if pos >= 0:
|
if pos >= 0:
|
||||||
return srs.reverse(val[pos+1:-1])
|
end = val.find('>',pos+4)
|
||||||
except: continue
|
return srs.reverse(val[pos+1:end])
|
||||||
|
except: pass
|
||||||
lnl = ln.lower()
|
lnl = ln.lower()
|
||||||
if lnl.startswith('action:'):
|
if lnl.startswith('action:'):
|
||||||
if lnl.split()[-1] != 'failed': break
|
if lnl.split()[-1] != 'failed': break
|
||||||
|
|||||||
Reference in New Issue
Block a user