diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2025-05-26 08:02:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-26 08:02:52 (GMT) |
commit | 1ce68f6297560c3d22169f0280a516b79375e947 (patch) | |
tree | f5e4fc725ba17dcba831d0ffca01b470a039861b /Lib/email/_header_value_parser.py | |
parent | ebfd18b3f01d00a2246003ea4dd5ad5e4bf6d570 (diff) | |
download | cpython-1ce68f6297560c3d22169f0280a516b79375e947.zip cpython-1ce68f6297560c3d22169f0280a516b79375e947.tar.gz cpython-1ce68f6297560c3d22169f0280a516b79375e947.tar.bz2 |
[3.14] gh-134152: Fix UnboundLocalError in email._header_value_parser _get_ptext_to_endchars (GH-134233) (#134678)
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
Diffstat (limited to 'Lib/email/_header_value_parser.py')
-rw-r--r-- | Lib/email/_header_value_parser.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py index 9a51b94..f11fa83 100644 --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -1020,6 +1020,8 @@ def _get_ptext_to_endchars(value, endchars): a flag that is True iff there were any quoted printables decoded. """ + if not value: + return '', '', False fragment, *remainder = _wsp_splitter(value, 1) vchars = [] escape = False |