[Spambayes-checkins] spambayes/spambayes message.py,1.66,1.67
Tony Meyer
anadelonbrin at users.sourceforge.net
Tue Jan 4 04:06:09 CET 2005
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1291/spambayes
Modified Files:
message.py
Log Message:
If a message had no subject/to then delNotations would fail. Fix that.
Index: message.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** message.py 23 Dec 2004 02:06:21 -0000 1.66
--- message.py 4 Jan 2005 03:06:06 -0000 1.67
***************
*** 556,581 ****
"""
subject = self["Subject"]
! ham = options["Headers", "header_ham_string"] + ','
! spam = options["Headers", "header_spam_string"] + ','
! unsure = options["Headers", "header_unsure_string"] + ','
! if options["Headers", "notate_subject"]:
! for disp in (ham, spam, unsure):
! if subject.startswith(disp):
! self.replace_header("Subject", subject[len(disp):])
! # Only remove one, maximum.
! break
to = self["To"]
! ham = "%s at spambayes.invalid," % \
! (options["Headers", "header_ham_string"],)
! spam = "%s at spambayes.invalid," % \
! (options["Headers", "header_spam_string"],)
! unsure = "%s at spambayes.invalid," % \
! (options["Headers", "header_unsure_string"],)
! if options["Headers", "notate_to"]:
! for disp in (ham, spam, unsure):
! if to.startswith(disp):
! self.replace_header("To", to[len(disp):])
! # Only remove one, maximum.
! break
def currentSBHeaders(self):
--- 556,583 ----
"""
subject = self["Subject"]
! if subject:
! ham = options["Headers", "header_ham_string"] + ','
! spam = options["Headers", "header_spam_string"] + ','
! unsure = options["Headers", "header_unsure_string"] + ','
! if options["Headers", "notate_subject"]:
! for disp in (ham, spam, unsure):
! if subject.startswith(disp):
! self.replace_header("Subject", subject[len(disp):])
! # Only remove one, maximum.
! break
to = self["To"]
! if to:
! ham = "%s at spambayes.invalid," % \
! (options["Headers", "header_ham_string"],)
! spam = "%s at spambayes.invalid," % \
! (options["Headers", "header_spam_string"],)
! unsure = "%s at spambayes.invalid," % \
! (options["Headers", "header_unsure_string"],)
! if options["Headers", "notate_to"]:
! for disp in (ham, spam, unsure):
! if to.startswith(disp):
! self.replace_header("To", to[len(disp):])
! # Only remove one, maximum.
! break
def currentSBHeaders(self):
More information about the Spambayes-checkins
mailing list