[Spambayes-checkins] spambayes/scripts sb_upload.py,1.2,1.3

Tony Meyer anadelonbrin at users.sourceforge.net
Wed Sep 15 08:54:00 CEST 2004


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

Modified Files:
	sb_upload.py 
Log Message:
Fix problems found by Graham Ashton:

Clarify docstring so that it's mroe clear what this script does.
The -n / --null command line option didn't actually do anything; change it so that it does.

Index: sb_upload.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_upload.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sb_upload.py	15 Jan 2004 03:39:11 -0000	1.2
--- sb_upload.py	15 Sep 2004 06:53:58 -0000	1.3
***************
*** 3,7 ****
  """
  Read a message or a mailbox file on standard input, upload it to a
! web browser and write it to standard output.
  
  usage:  %(progname)s [-h] [-n] [-s server] [-p port] [-r N]
--- 3,12 ----
  """
  Read a message or a mailbox file on standard input, upload it to a
! web server and write it to standard output.
! 
! By default, this sends the message to the SpamBayes sb_server web
! interface, which will save the message in the 'unknown' cache, ready
! for you to classify it.  It does not do any training, just saves it
! ready for you to classify.
  
  usage:  %(progname)s [-h] [-n] [-s server] [-p port] [-r N]
***************
*** 129,133 ****
  
      data = sys.stdin.read()
!     sys.stdout.write(data)
      if random.random() < prob:
          try:
--- 134,139 ----
  
      data = sys.stdin.read()
!     if not null:
!         sys.stdout.write(data)
      if random.random() < prob:
          try:



More information about the Spambayes-checkins mailing list