summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2021-10-13 17:12:22 (GMT)
committerGitHub <noreply@github.com>2021-10-13 17:12:22 (GMT)
commitf8473f6f7603f8cccccc3307d4cb853587be41b3 (patch)
tree1155b0afe30283840770d0e73e13b20407eb4c77 /Lib/email
parent151234f5da4b1922e3d91233a6eddda92d7269b0 (diff)
downloadcpython-f8473f6f7603f8cccccc3307d4cb853587be41b3.zip
cpython-f8473f6f7603f8cccccc3307d4cb853587be41b3.tar.gz
cpython-f8473f6f7603f8cccccc3307d4cb853587be41b3.tar.bz2
[3.10] bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452) (GH-28930)
Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit b9e687618d3489944f29adbd2be50b46940c9e70) Co-authored-by: Ben Hoyt <benhoyt@gmail.com>
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/_parseaddr.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py
index 977fedf..ba5ad5a 100644
--- a/Lib/email/_parseaddr.py
+++ b/Lib/email/_parseaddr.py
@@ -128,6 +128,8 @@ def _parsedate_tz(data):
tss = 0
elif len(tm) == 3:
[thh, tmm, tss] = tm
+ else:
+ return None
else:
return None
try: