Mercurial > hg
changeset 36118:9e47bfbeb723
py3: cast decode() argument to system string
The actual types here may be mixed due to string literals
and variables from other modules. So a cast is necessary.
Differential Revision: https://phab.mercurial-scm.org/D2166
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 18:47:19 -0800 |
parents | c02771617a70 |
children | 6ea7f1c10c81 |
files | mercurial/mail.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py Sun Feb 11 16:56:29 2018 -0800 +++ b/mercurial/mail.py Sun Feb 11 18:47:19 2018 -0800 @@ -206,7 +206,7 @@ return mimetextqp(s, subtype, 'us-ascii') for charset in cs: try: - s.decode(charset) + s.decode(pycompat.sysstr(charset)) return mimetextqp(s, subtype, codec2iana(charset)) except UnicodeDecodeError: pass