From: Barry Warsaw Date: Thu, 8 May 2003 03:33:15 +0000 (+0000) Subject: parsedate_tz(): Be slightly more lenient when there's no day of the X-Git-Tag: v2.3c1~804 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5dc39f02c47d561110171e014c340844f4a52b3;p=python parsedate_tz(): Be slightly more lenient when there's no day of the week. Patch given by Daniel Berlin in SF bug # 732761. Also closes SF bug # 727719. Backport candidate. --- diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py index 2b28b64304..c56cfd03cf 100644 --- a/Lib/email/_parseaddr.py +++ b/Lib/email/_parseaddr.py @@ -54,9 +54,8 @@ def parsedate_tz(data): del data[0] else: i = data[0].rfind(',') - if i < 0: - return None - data[0] = data[0][i+1:] + if i >= 0: + data[0] = data[0][i+1:] if len(data) == 3: # RFC 850 date, deprecated stuff = data[0].split('-') if len(stuff) == 3: