From patchwork Wed Feb 14 00:13:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2245: ui: coerce system exception to bytes before dropping it in our StdioError From: phabricator X-Patchwork-Id: 27864 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 14 Feb 2018 00:13:31 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2245 AFFECTED FILES mercurial/ui.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel 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