[Spambayes-checkins] spambayes/scripts sb_mboxtrain.py,1.8,1.9

Tony Meyer anadelonbrin at projects.sourceforge.net
Tue Jan 27 02:53:39 EST 2004


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

Modified Files:
	sb_mboxtrain.py 
Log Message:
Fix [ 881427 ] sb_mboxtrain.py requires -d or -D


Index: sb_mboxtrain.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_mboxtrain.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** sb_mboxtrain.py	15 Jan 2004 03:27:40 -0000	1.8
--- sb_mboxtrain.py	27 Jan 2004 07:53:35 -0000	1.9
***************
*** 17,25 ****
          creating it is slower, but loading it is much faster,
          especially for large word databases.  Recommended for use with
!         hammiefilter or any procmail-based filter.
      -D DBNAME
          use the pickle store.  A pickle is smaller and faster to create,
!         but much slower to load.  Recommended for use with pop3proxy and
!         hammiesrv.
      -g PATH
          mbox or directory of known good messages (non-spam) to train on.
--- 17,25 ----
          creating it is slower, but loading it is much faster,
          especially for large word databases.  Recommended for use with
!         s_filter or any procmail-based filter.
      -D DBNAME
          use the pickle store.  A pickle is smaller and faster to create,
!         but much slower to load.  Recommended for use with sb_server and
!         sb_xmlrpcserver.
      -g PATH
          mbox or directory of known good messages (non-spam) to train on.
***************
*** 51,55 ****
  import sys, os, getopt, email
  from spambayes import hammie
! from spambayes.Options import options
  
  program = sys.argv[0]
--- 51,55 ----
  import sys, os, getopt, email
  from spambayes import hammie
! from spambayes.Options import options, get_pathname_option
  
  program = sys.argv[0]
***************
*** 327,331 ****
  
      if usedb == None:
!         usage(2, "Must specify one of -d or -D")
  
      h = hammie.open(pck, usedb, "c")
--- 327,334 ----
  
      if usedb == None:
!         # Use settings in configuration file.
!         usedb = options["Storage", "persistent_use_database"]
!         pck = get_pathname_option("Storage",
!                                           "persistent_storage_file")
  
      h = hammie.open(pck, usedb, "c")




More information about the Spambayes-checkins mailing list