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

Modified Files:
        message.py 
Log Message:
Handle message not having a proper separator in insert_exception_header.

Change sb_server to use the centralised insert_exception_header code.

Index: message.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** message.py  25 Nov 2004 23:19:04 -0000      1.59
--- message.py  29 Nov 2004 00:17:59 -0000      1.60
***************
*** 539,546 ****
      # otherwise we might keep doing this message over and over again.
      # We also ensure that the line endings are /r/n as RFC822 requires.
!     headers, body = re.split(r'\n\r?\n', string_msg, 1)
      header = re.sub(r'\r?\n', '\r\n', str(header))
!     headers += "\n%s: %s\r\n" % \
!                (headerName, header)
      if msg_id:
          headers += "%s: %s\r\n" % \
--- 539,550 ----
      # otherwise we might keep doing this message over and over again.
      # We also ensure that the line endings are /r/n as RFC822 requires.
!     try:
!         headers, body = re.split(r'\n\r?\n', string_msg, 1)
!     except ValueError:
!         # No body - this is a bad message!
!         headers = string_msg
!         body = ""
      header = re.sub(r'\r?\n', '\r\n', str(header))
!     headers += "\n%s: %s\r\n" % (headerName, header)
      if msg_id:
          headers += "%s: %s\r\n" % \

_______________________________________________
Spambayes-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to