[Python-bugs-list] [ python-Bugs-478115 ] rfc822.Message.getdate('Date') exception

noreply@sourceforge.net noreply@sourceforge.net
Sun, 04 Nov 2001 15:10:58 -0800


Bugs item #478115, was opened at 2001-11-04 15:10
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=478115&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Piers Lauder (pierslauder)
Assigned to: Nobody/Anonymous (nobody)
Summary: rfc822.Message.getdate('Date') exception

Initial Comment:
rfc822.Message.getdate('Date') will raise an IndexError
exception if the message header contains a null Date
line.

An example Python script that reproduces the exception
is attached.

As far as I know, this affects all versions of
rfc822.py.

The error is in rfc822.parsedate_tz which assumes
that its string argument is non-empty.

The first line should probably be:
	if not data: return None


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=478115&group_id=5470