Mercurial > public > mercurial-scm > hg
diff mercurial/commandserver.py @ 40361:b7de186efd82
py3: don't use traceback.print_exc() in commandserver.py
It doesn't support a bytes stream on Python 3. This makes a traceback being
sent by one frame, but that shouldn't matter.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 16 Oct 2018 08:41:58 +0200 |
parents | 558114fa7bc1 |
children | 9683dfb6f13a 41f0529b5112 |
line wrap: on
line diff
--- a/mercurial/commandserver.py Tue Oct 16 08:29:24 2018 +0200 +++ b/mercurial/commandserver.py Tue Oct 16 08:41:58 2018 +0200 @@ -369,7 +369,7 @@ cerr = sv.cerr else: cerr = channeledoutput(fout, 'e') - traceback.print_exc(file=cerr) + cerr.write(encoding.strtolocal(traceback.format_exc())) raise finally: fin.close()