[Spambayes-checkins] spambayes mboxutils.py,1.5,1.6 tokenizer.py,1.66,1.67

Tim Peters tim_one@users.sourceforge.net
Tue Nov 12 23:16:06 2002


Update of /cvsroot/spambayes/spambayes
In directory usw-pr-cvs1:/tmp/cvs-serv1192

Modified Files:
	mboxutils.py tokenizer.py 
Log Message:
get_message():  changed to use the new extract_headers() hack.


Index: mboxutils.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/mboxutils.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mboxutils.py	12 Nov 2002 23:12:11 -0000	1.5
--- mboxutils.py	12 Nov 2002 23:16:04 -0000	1.6
***************
*** 114,120 ****
          # headers are most likely damaged, we can't use the email
          # package to parse them, so just get rid of them first.
!         i = obj.find('\n\n')
!         if i >= 0:
!             obj = obj[i+2:]     # strip headers
          msg = email.Message.Message()
          msg.set_payload(obj)
--- 114,119 ----
          # headers are most likely damaged, we can't use the email
          # package to parse them, so just get rid of them first.
!         headers = extract_headers(obj)
!         obj = obj[len(headers):]
          msg = email.Message.Message()
          msg.set_payload(obj)

Index: tokenizer.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/tokenizer.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** tokenizer.py	12 Nov 2002 06:21:38 -0000	1.66
--- tokenizer.py	12 Nov 2002 23:16:04 -0000	1.67
***************
*** 17,20 ****
--- 17,21 ----
  from Options import options
  
+ import mboxutils
  from mboxutils import get_message
  





More information about the Spambayes-checkins mailing list