summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-23 16:57:12 (GMT)
committerGitHub <noreply@github.com>2022-05-23 16:57:12 (GMT)
commita509d2674a388a13ca55451480673e2af2ab2875 (patch)
tree1afc9234077df22ad95b41a42fe3a6a29a191d80 /Lib/email
parentfc31e2de3cf26bf10e56309b02f147fe8e9b9cfd (diff)
downloadcpython-a509d2674a388a13ca55451480673e2af2ab2875.zip
cpython-a509d2674a388a13ca55451480673e2af2ab2875.tar.gz
cpython-a509d2674a388a13ca55451480673e2af2ab2875.tar.bz2
gh-93010: InvalidHeaderError used but nonexistent (GH-93015)
* fix issue 93010 Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 71abeb0895f7563dc5ac4b4f077a8f87dab57e7a) Co-authored-by: oda-gitso <105083118+oda-gitso@users.noreply.github.com>
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/_header_value_parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
index 8a8fb8b..e637e6d 100644
--- a/Lib/email/_header_value_parser.py
+++ b/Lib/email/_header_value_parser.py
@@ -2379,7 +2379,7 @@ def get_section(value):
digits += value[0]
value = value[1:]
if digits[0] == '0' and digits != '0':
- section.defects.append(errors.InvalidHeaderError(
+ section.defects.append(errors.InvalidHeaderDefect(
"section number has an invalid leading 0"))
section.number = int(digits)
section.append(ValueTerminal(digits, 'digits'))