Patchwork D2245: ui: coerce system exception to bytes before dropping it in our StdioError

login
register
mail settings
Submitter phabricator
Date Feb. 14, 2018, 5:09 a.m.
Message ID <a9409711f9bba5e6eff81ae4fa996fe4@localhost.localdomain>
Download mbox | patch
Permalink /patch/27875/
State Not Applicable
Headers show

Comments

phabricator - Feb. 14, 2018, 5:09 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4d820b8ad42f: ui: coerce system exception to bytes before dropping it in our StdioError (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2245?vs=5669&id=5680

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -958,7 +958,7 @@ 
                     self.ferr.flush()
         except IOError as inst:
             if inst.errno not in (errno.EPIPE, errno.EIO, errno.EBADF):
-                raise error.StdioError(inst)
+                raise error.StdioError(pycompat.bytestr(inst))
 
     def flush(self):
         # opencode timeblockedsection because this is a critical path