[Python-bugs-list] [ python-Bugs-478115 ] rfc822.Message.getdate('Date') exception
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 13 Nov 2001 09:58:10 -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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Piers Lauder (pierslauder)
Assigned to: Barry Warsaw (bwarsaw)
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
----------------------------------------------------------------------
>Comment By: Barry Warsaw (bwarsaw)
Date: 2001-11-13 09:58
Message:
Logged In: YES
user_id=12800
Fixed in rfc822.py 1.64
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=478115&group_id=5470