[Spambayes-checkins] spambayes/spambayes message.py,1.46,1.47

Tony Meyer anadelonbrin at users.sourceforge.net
Thu Feb 12 16:36:17 EST 2004


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14097/spambayes

Modified Files:
	message.py 
Log Message:
Fix [ 895606 ] 1.0a9 proxy raises an X-Spambayes-Exception

Index: message.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** message.py	12 Jan 2004 08:42:53 -0000	1.46
--- message.py	12 Feb 2004 21:36:14 -0000	1.47
***************
*** 398,402 ****
          # allow filtering in 'stripped down' mailers like Outlook Express,
          # so for the moment, they stay in.
!         if disposition in options["Headers", "notate_to"]:
              try:
                  self.replace_header("To", "%s,%s" % (disposition,
--- 398,412 ----
          # allow filtering in 'stripped down' mailers like Outlook Express,
          # so for the moment, they stay in.
!         # options["Headers", "notate_to"] (and notate_subject) can be
!         # either a single string (like "spam") or a tuple (like
!         # ("unsure", "spam")).  In Python 2.3 checking for a string in
!         # something that could be a string or a tuple works fine, but
!         # it dies in Python 2.2, because you can't do 'string in string',
!         # only 'character in string', so we allow for that.
!         if isinstance(options["Headers", "notate_to"], types.StringTypes):
!             notate_to = (options["Headers", "notate_to"],)
!         else:
!             notate_to = options["Headers", "notate_to"]
!         if disposition in notate_to:
              try:
                  self.replace_header("To", "%s,%s" % (disposition,
***************
*** 405,409 ****
                  self["To"] = disposition
  
!         if disposition in options["Headers", "notate_subject"]:
              try:
                  self.replace_header("Subject", "%s,%s" % (disposition,
--- 415,423 ----
                  self["To"] = disposition
  
!         if isinstance(options["Headers", "notate_subject"], types.StringTypes):
!             notate_subject = (options["Headers", "notate_subject"],)
!         else:
!             notate_subject = options["Headers", "notate_subject"]
!         if disposition in notate_subject:
              try:
                  self.replace_header("Subject", "%s,%s" % (disposition,




More information about the Spambayes-checkins mailing list