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 71abeb0895)

Co-authored-by: oda-gitso <105083118+oda-gitso@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2022-05-23 09:57:12 -07:00 committed by GitHub
parent fc31e2de3c
commit a509d2674a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 10 deletions

View file

@ -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'))