]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38698: Prevent UnboundLocalError to pop up in parse_message_id (GH-17277)
authorClaudiu Popa <pcmanticore@gmail.com>
Thu, 5 Dec 2019 03:14:26 +0000 (04:14 +0100)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 5 Dec 2019 03:14:26 +0000 (19:14 -0800)
commitbb815499af855b1759c02535f8d7a9d0358e74e8
tree1ee1d5c2c5377e0a8ed71a9153af4c76b6824d6d
parent8b787964e0a647caa0558b7c29ae501470d727d9
bpo-38698: Prevent UnboundLocalError to pop up in parse_message_id (GH-17277)

parse_message_id() was improperly using a token defined inside an exception
handler, which was raising `UnboundLocalError` on parsing an invalid value.

https://bugs.python.org/issue38698
Lib/email/_header_value_parser.py
Lib/test/test_email/test__header_value_parser.py
Misc/NEWS.d/next/Library/2019-12-02-10-35-19.bpo-38698.WZnAPQ.rst [new file with mode: 0644]