summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-05-08 03:33:15 (GMT)
committerBarry Warsaw <barry@python.org>2003-05-08 03:33:15 (GMT)
commitb5dc39f02c47d561110171e014c340844f4a52b3 (patch)
treef3e6c0fbc25aaf890e11dfaca6308990a779818d /Lib
parent86e1790cad8bb85faad5e91e1a46dc7c6373d20a (diff)
downloadcpython-b5dc39f02c47d561110171e014c340844f4a52b3.zip
cpython-b5dc39f02c47d561110171e014c340844f4a52b3.tar.gz
cpython-b5dc39f02c47d561110171e014c340844f4a52b3.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/_parseaddr.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py
index 2b28b64..c56cfd0 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: