Mercurial > hg > mercurial-source
changeset 36833:1407c42b302c
py3: pass system string to email.message.Message.set_type()
Python 3 insists the type is a str.
Differential Revision: https://phab.mercurial-scm.org/D2149
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 14:25:10 -0800 (2018-02-11) |
parents | a5cf79755eff |
children | 194463554ba5 |
files | mercurial/mail.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py +++ b/mercurial/mail.py @@ -20,6 +20,7 @@ from . import ( encoding, error, + pycompat, sslutil, util, ) @@ -218,7 +219,7 @@ ''' cs = email.charset.Charset(charset) msg = email.message.Message() - msg.set_type('text/' + subtype) + msg.set_type(pycompat.sysstr('text/' + subtype)) for line in body.splitlines(): if len(line) > 950: