[Spambayes-checkins] spambayes/scripts sb_server.py,1.22,1.23

Tony Meyer anadelonbrin at users.sourceforge.net
Wed Jul 14 09:18:55 CEST 2004


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

Modified Files:
	sb_server.py 
Log Message:
Avoid using setPayload, which doesn't work with Python 2.4a1.

(When [ 990700 ] Changes to asyncore in Python 2.4 break ServerLineReader and
[ 990685 ] Change in cgi.parse_qs breaks sb_server in Python 2.4 are checked in
sb_server appears to work with Python 2.4a1 from my admittedly limited testing).

Index: sb_server.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_server.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** sb_server.py	9 Jul 2004 09:26:21 -0000	1.22
--- sb_server.py	14 Jul 2004 07:18:53 -0000	1.23
***************
*** 468,473 ****
  
              try:
!                 msg = spambayes.message.SBHeaderMessage()
!                 msg.setPayload(messageText)
                  msg.setId(state.getNewMessageName())
                  # Now find the spam disposition and add the header.
--- 468,472 ----
  
              try:
!                 msg = spambayes.message.sbheadermessage_from_string(messageText)
                  msg.setId(state.getNewMessageName())
                  # Now find the spam disposition and add the header.
***************
*** 509,514 ****
                          not isSuppressedBulkHam and not isTooBig):
                          # Write the message into the Unknown cache.
!                         message = state.unknownCorpus.makeMessage(msg.getId())
!                         message.setPayload(msg.as_string())
                          state.unknownCorpus.addMessage(message)
  
--- 508,513 ----
                          not isSuppressedBulkHam and not isTooBig):
                          # Write the message into the Unknown cache.
!                         makeMessage = state.unknownCorpus.makeMessage
!                         message = makeMessage(msg.getId(), msg.as_string())
                          state.unknownCorpus.addMessage(message)
  



More information about the Spambayes-checkins mailing list