Mercurial > cpython-lru_cache-weakref
diff Lib/email/_parseaddr.py @ 67097:765796a34abe
#1155362: allow hh:mm:ss-uuuu like we allow hh:mm:ss+uuuu in parsedate_tz
Original patch by Thomas Herve.
| author | R. David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Thu, 23 Dec 2010 20:35:46 +0000 |
| parents | 9385c536f454 |
| children | 27fe09ff14b7 9d7a83654870 |
line wrap: on
line diff
--- a/Lib/email/_parseaddr.py Thu Dec 23 19:44:49 2010 +0000 +++ b/Lib/email/_parseaddr.py Thu Dec 23 20:35:46 2010 +0000 @@ -64,8 +64,10 @@ if len(data) == 4: s = data[3] i = s.find('+') + if i == -1: + i = s.find('-') if i > 0: - data[3:] = [s[:i], s[i+1:]] + data[3:] = [s[:i], s[i:]] else: data.append('') # Dummy tz if len(data) < 5:
