[Spambayes-checkins] spambayes/scripts sb_server.py,1.32,1.33

Tony Meyer anadelonbrin at users.sourceforge.net
Tue Dec 21 00:24:12 CET 2004


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

Modified Files:
	sb_server.py 
Log Message:
Kenny's fix worked if there was more than +OK, but not if there was just +OK.  Fix
 the fix so that both cases work.

Index: sb_server.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_server.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** sb_server.py	20 Dec 2004 15:42:17 -0000	1.32
--- sb_server.py	20 Dec 2004 23:24:03 -0000	1.33
***************
*** 457,461 ****
          """Adds the judgement header based on the raw headers and body
          of the message."""
!         # Previously, we used '\n\r?\n' to detect the end of the headers in
          # case of broken emails that don't use the proper line separators,
          # and if we couldn't find it, then we assumed that the response was
--- 457,461 ----
          """Adds the judgement header based on the raw headers and body
          of the message."""
!         # Previous, we used '\n\r?\n' to detect the end of the headers in
          # case of broken emails that don't use the proper line separators,
          # and if we couldn't find it, then we assumed that the response was
***************
*** 475,479 ****
          # Break off the first line, which will be '+OK'.
          statusLine, messageText = response.split('\n', 1)
!         ok, statusRemainder = statusLine.split(None, 1)
          if ok.strip().upper() != "+OK":
              # Must be an error response.  Return unproxied.
--- 475,480 ----
          # Break off the first line, which will be '+OK'.
          statusLine, messageText = response.split('\n', 1)
!         statusData = statusLine.split()
!         ok = statusData[0]
          if ok.strip().upper() != "+OK":
              # Must be an error response.  Return unproxied.



More information about the Spambayes-checkins mailing list