From patchwork Sun Feb 18 01:45:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2292: scmutil: bytes-ify IOErrors before wrapping them in abort message From: phabricator X-Patchwork-Id: 28033 Message-Id: <44e546f48a01b106455c41a15308f577@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sun, 18 Feb 2018 01:45:51 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG2b00dda6dad9: scmutil: bytes-ify IOErrors before wrapping them in abort message (authored by durin42, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D2292?vs=5813&id=5815#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2292?vs=5813&id=5815 REVISION DETAIL https://phab.mercurial-scm.org/D2292 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS To: durin42, #hg-reviewers, yuja Cc: pulkit, mercurial-devel diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -215,7 +215,7 @@ ui.warn(_("(is your Python install correct?)\n")) except IOError as inst: if util.safehasattr(inst, "code"): - ui.warn(_("abort: %s\n") % inst) + ui.warn(_("abort: %s\n") % util.forcebytestr(inst)) elif util.safehasattr(inst, "reason"): try: # usually it is in the form (errno, strerror) reason = inst.reason.args[1]