Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5dc39f

Browse files
committed
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.
1 parent 86e1790 commit b5dc39f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/email/_parseaddr.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ def parsedate_tz(data):
5454
del data[0]
5555
else:
5656
i = data[0].rfind(',')
57-
if i < 0:
58-
return None
59-
data[0] = data[0][i+1:]
57+
if i >= 0:
58+
data[0] = data[0][i+1:]
6059
if len(data) == 3: # RFC 850 date, deprecated
6160
stuff = data[0].split('-')
6261
if len(stuff) == 3:

0 commit comments

Comments
 (0)