mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
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.
This commit is contained in:
parent
86e1790cad
commit
b5dc39f02c
1 changed files with 2 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue