Skip to content

Bare except in email._header_value_parser.get_parameter #155917

Description

@cmw0213

Bug report

Bug description:

Bug Description

In Lib/email/_header_value_parser.py (line 2540), get_parameter() uses a bare except: which silently catches all exceptions.
It should be narrowed to except errors.HeaderParseError: to match other call sites in the same file.

cc @hugovk @corona10

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-emailtype-refactorCode refactoring (with no changes in behavior)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions