[Spambayes-checkins] spambayes/Outlook2000 filter.py,1.21,1.22
Mark Hammond
mhammond at users.sourceforge.net
Wed Jun 4 18:50:13 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1:/tmp/cvs-serv29246
Modified Files:
filter.py
Log Message:
When filtering, saving the spam score is no longer fatal - we log the
error then continue to attempt the filter action.
Index: filter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/filter.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** filter.py 16 May 2003 03:50:56 -0000 1.21
--- filter.py 5 Jun 2003 00:50:10 -0000 1.22
***************
*** 29,41 ****
try:
! # Save the score
! msg.SetField(mgr.config.field_score_name, prob)
! # and the ID of the folder we were in when scored.
! # (but only if we want to perform all actions)
! # Note we must do this, and the Save, before the
! # filter, else the save will fail.
! if all_actions:
! msg.RememberMessageCurrentFolder()
! msg.Save()
if all_actions and attr_prefix is not None:
--- 29,49 ----
try:
! try:
! # Save the score
! # Catch this exception, as failing to save the score need not
! # be fatal - it may still be possible to perform the move.
! msg.SetField(mgr.config.field_score_name, prob)
! # and the ID of the folder we were in when scored.
! # (but only if we want to perform all actions)
! # Note we must do this, and the Save, before the
! # filter, else the save will fail.
! if all_actions:
! msg.RememberMessageCurrentFolder()
! msg.Save()
! except:
! print "Failed to save the Spam score for message ", msg
! import traceback
! traceback.print_exc()
! print "Still (possibly) atempting to move this message though..."
if all_actions and attr_prefix is not None:
More information about the Spambayes-checkins
mailing list