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

Modified Files:
        sb_filter.py 
Log Message:
When training, have sb_filter honour the Headers:include_trained option.

This means that the output of sb_filter will only include the 
X-Spambayes-Trained
 header if that option is set to true (like sb_mboxtrain).  As the default 
value for
that option is true, default behaviour is unchanged.

Index: sb_filter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_filter.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** sb_filter.py        23 Dec 2004 18:14:18 -0000      1.16
--- sb_filter.py        1 Apr 2005 04:11:22 -0000       1.17
***************
*** 184,193 ****
      def train_ham(self, msg):
          self.open('c')
!         self.h.train_ham(msg, True)
          self.h.store()
  
      def train_spam(self, msg):
          self.open('c')
!         self.h.train_spam(msg, True)
          self.h.store()
  
--- 184,193 ----
      def train_ham(self, msg):
          self.open('c')
!         self.h.train_ham(msg, Options.options["Headers", "include_trained"])
          self.h.store()
  
      def train_spam(self, msg):
          self.open('c')
!         self.h.train_spam(msg, Options.options["Headers", "include_trained"])
          self.h.store()
  

_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to