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
3 files changed