Mercurial > hg
changeset 43328:416041f97cc3 stable
py3: decode email headers with mail.headdecode() in notify extension
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 24 Oct 2019 15:50:15 +0200 |
parents | ac33550f63e8 |
children | 33506cb43642 |
files | hgext/notify.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/notify.py Thu Oct 24 15:46:16 2019 +0200 +++ b/hgext/notify.py Thu Oct 24 15:50:15 2019 +0200 @@ -391,9 +391,9 @@ sender = msg[r'From'] subject = msg[r'Subject'] if sender is not None: - sender = encoding.strtolocal(sender) + sender = mail.headdecode(sender) if subject is not None: - subject = encoding.strtolocal(subject) + subject = mail.headdecode(subject) del msg[r'From'], msg[r'Subject'] if not msg.is_multipart():