[Spambayes-checkins] spambayes/contrib tte.py,1.9,1.10
Skip Montanaro
montanaro at users.sourceforge.net
Mon Jun 28 09:23:03 EDT 2004
Update of /cvsroot/spambayes/spambayes/contrib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7665
Modified Files:
tte.py
Log Message:
Worm around the extremely rare case during verbose most where the message
sneaks through without either a message-id or a subject.
Index: tte.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/contrib/tte.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tte.py 28 Apr 2004 03:29:46 -0000 1.9
--- tte.py 28 Jun 2004 13:22:58 -0000 1.10
***************
*** 113,117 ****
if score > ham_cutoff:
if verbose:
! print >> sys.stderr, "miss ham: %.6f %s" % (score, hammsg["message-id"])
hmisses += 1
tdict[hammsg["message-id"]] = True
--- 113,125 ----
if score > ham_cutoff:
if verbose:
! selector = (hammsg["message-id"] or
! hammsg["subject"])
! if selector is None:
! print >> sys.stderr, "-"*25
! print >> sys.stderr, mboxutils.as_string(hammsg)
! print >> sys.stderr, "-"*25
! else:
! print >> sys.stderr, "miss ham: %.6f %s" % (
! score, selector)
hmisses += 1
tdict[hammsg["message-id"]] = True
***************
*** 121,125 ****
if score < spam_cutoff:
if verbose:
! print >> sys.stderr, "miss spam: %.6f %s" % (score, spammsg["message-id"])
smisses += 1
tdict[spammsg["message-id"]] = True
--- 129,141 ----
if score < spam_cutoff:
if verbose:
! selector = (spammsg["message-id"] or
! spammsg["subject"])
! if selector is None:
! print >> sys.stderr, "-"*25
! print >> sys.stderr, mboxutils.as_string(spammsg)
! print >> sys.stderr, "-"*25
! else:
! print >> sys.stderr, "miss spam: %.6f %s" % (
! score, selector)
smisses += 1
tdict[spammsg["message-id"]] = True
More information about the Spambayes-checkins
mailing list