py3: decode encoding literal before passing to .decode()
bytes.decode(<encoding>) wants an str as "encoding" parameter,
it raises a TypeError if given a bytestring. encoding.encoding and
encoding.fallbackencoding are bytes values.
--- a/mercurial/mail.py Thu Oct 24 16:34:43 2019 +0200
+++ b/mercurial/mail.py Thu Oct 24 14:28:20 2019 +0200
@@ -342,6 +342,7 @@
s.decode('ascii')
except UnicodeDecodeError:
for ics in (encoding.encoding, encoding.fallbackencoding):
+ ics = pycompat.sysstr(ics)
try:
u = s.decode(ics)
except UnicodeDecodeError: