Mercurial > hg
changeset 43324:866bd2cf764b stable
mail: catch LookupError in headdecode()
We already catch this exception in _encode() (called by headencode()).
It gets raised when running test-notify.t with Python 3.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 24 Oct 2019 14:31:24 +0200 |
parents | 84c15836a2d7 |
children | 7d4f2e4899c5 |
files | mercurial/mail.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py Thu Oct 24 16:56:36 2019 +0200 +++ b/mercurial/mail.py Thu Oct 24 14:31:24 2019 +0200 @@ -458,7 +458,7 @@ try: uparts.append(part.decode(charset)) continue - except UnicodeDecodeError: + except (UnicodeDecodeError, LookupError): pass # On Python 3, decode_header() may return either bytes or unicode # depending on whether the header has =?<charset>? or not