Patchwork D7670: ui: convert exception data to bytes when printing chained exception info

login
register
mail settings
Submitter phabricator
Date Dec. 16, 2019, 6:31 a.m.
Message ID <945f9c7be46d4eea73c7bc9e03400da7@localhost.localdomain>
Download mbox | patch
Permalink /patch/43854/
State Not Applicable
Headers show

Comments

phabricator - Dec. 16, 2019, 6:31 a.m.
Closed by commit rHGe63b27fb0595: ui: convert exception data to bytes when printing chained exception info (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7670?vs=18734&id=18746

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7670/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7670

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1857,9 +1857,9 @@ 
                 # exclude frame where 'exc' was chained and rethrown from exctb
                 self.write_err(
                     b'Traceback (most recent call last):\n',
-                    b''.join(exctb[:-1]),
-                    b''.join(causetb),
-                    b''.join(exconly),
+                    encoding.strtolocal(''.join(exctb[:-1])),
+                    encoding.strtolocal(''.join(causetb)),
+                    encoding.strtolocal(''.join(exconly)),
                 )
             else:
                 output = traceback.format_exception(exc[0], exc[1], exc[2])