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
--- 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