Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 35937:4b1c04082cdc
py3: replace "if ispy3" by encoding.strtolocal()
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 27 Jan 2018 13:09:49 +0900 |
parents | e49c39ffeac2 |
children | 72de5c504833 |
line wrap: on
line diff
--- a/mercurial/ui.py Sat Feb 03 00:01:57 2018 -0500 +++ b/mercurial/ui.py Sat Jan 27 13:09:49 2018 +0900 @@ -1508,11 +1508,7 @@ ''.join(exconly)) else: output = traceback.format_exception(exc[0], exc[1], exc[2]) - data = r''.join(output) - if pycompat.ispy3: - enc = pycompat.sysstr(encoding.encoding) - data = data.encode(enc, errors=r'replace') - self.write_err(data) + self.write_err(encoding.strtolocal(r''.join(output))) return self.tracebackflag or force def geteditor(self):