parsedate_tz(): Minor cleanup.

Port from Python 2.3/email 2.5: Add a test for the tm_yday field is 1 in the
return of parsedate().
This commit is contained in:
Barry Warsaw 2006-02-03 04:44:52 +00:00
parent 5a49fae1ab
commit 602426e3cf
2 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,4 @@
# Copyright (C) 2002-2004 Python Software Foundation
# Copyright (C) 2002-2006 Python Software Foundation
# Contact: email-sig@python.org
"""Email address parsing code.
@ -117,8 +117,7 @@ def parsedate_tz(data):
else:
tzsign = 1
tzoffset = tzsign * ( (tzoffset//100)*3600 + (tzoffset % 100)*60)
tuple = (yy, mm, dd, thh, tmm, tss, 0, 1, 0, tzoffset)
return tuple
return yy, mm, dd, thh, tmm, tss, 0, 1, 0, tzoffset
def parsedate(data):