[Spambayes-checkins] spambayes/contrib mod_spambayes.py,1.1,1.2

Tony Meyer anadelonbrin at users.sourceforge.net
Sat May 3 21:10:38 EDT 2003


Update of /cvsroot/spambayes/spambayes/contrib
In directory sc8-pr-cvs1:/tmp/cvs-serv10163/contrib

Modified Files:
	mod_spambayes.py 
Log Message:
Updated to use new options style.

Index: mod_spambayes.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/contrib/mod_spambayes.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mod_spambayes.py	2 Feb 2003 18:28:27 -0000	1.1
--- mod_spambayes.py	4 May 2003 03:10:36 -0000	1.2
***************
*** 12,16 ****
  
  from spambayes import hammie, Options, mboxutils
! dbf = os.path.expanduser(Options.options.hammiefilter_persistent_storage_file)
  
  class SpambayesFilter(BufferAllFilter):
--- 12,16 ----
  
  from spambayes import hammie, Options, mboxutils
! dbf = os.path.expanduser(Options.options["Storage", "persistent_storage_file"])
  
  class SpambayesFilter(BufferAllFilter):
***************
*** 21,25 ****
              prob = self.hammie.score("%s\r\n%s" % (self.serverheaders, s))
              print "|  prob: %.5f" % prob
!             if prob >= Options.options.spam_cutoff:
                  print self.serverheaders
                  print "text:", s[0:40], "...", s[-40:]
--- 21,25 ----
              prob = self.hammie.score("%s\r\n%s" % (self.serverheaders, s))
              print "|  prob: %.5f" % prob
!             if prob >= Options.options["Categorization", "spam_cutoff"]:
                  print self.serverheaders
                  print "text:", s[0:40], "...", s[-40:]





More information about the Spambayes-checkins mailing list