[Spambayes-checkins] spambayes pop3proxy.py,1.60,1.61

Skip Montanaro montanaro at users.sourceforge.net
Thu Mar 6 07:46:55 EST 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv10103

Modified Files:
	pop3proxy.py 
Log Message:
Add an extra element to the except clause which catches header parse
errors.  Version 2.5 of the email package intercepts the binascii.Error
exception and raises email.Errors.HeaderParseError instead.


Index: pop3proxy.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/pop3proxy.py,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** pop3proxy.py	6 Mar 2003 14:13:34 -0000	1.60
--- pop3proxy.py	6 Mar 2003 15:46:51 -0000	1.61
***************
*** 647,651 ****
          try:
              sections = email.Header.decode_header(field)
!         except binascii.Error:
              sections = [(field, None)]
          field = ' '.join([text for text, unused in sections])
--- 647,651 ----
          try:
              sections = email.Header.decode_header(field)
!         except (binascii.Error, email.Errors.HeaderParseError):
              sections = [(field, None)]
          field = ' '.join([text for text, unused in sections])





More information about the Spambayes-checkins mailing list