[Python-checkins] python/dist/src/Lib/email FeedParser.py,1.2,1.3

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Mon May 10 10:48:33 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7132

Modified Files:
	FeedParser.py 
Log Message:
_parse_headers(): Strip a trailing newline from the envelope header.  Closes
SF #951088.


Index: FeedParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/FeedParser.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FeedParser.py	9 May 2004 03:29:23 -0000	1.2
--- FeedParser.py	10 May 2004 14:48:30 -0000	1.3
***************
*** 405,408 ****
--- 405,412 ----
              if line.startswith('From '):
                  if lineno == 0:
+                     # Strip off the trailing newline
+                     mo = NLCRE_eol.search(line)
+                     if mo:
+                         line = line[:-len(mo.group(0))]
                      self._cur.set_unixfrom(line)
                      continue




More information about the Python-checkins mailing list