changeset 36262:2b00dda6dad9

scmutil: bytes-ify IOErrors before wrapping them in abort message Differential Revision: https://phab.mercurial-scm.org/D2292
author Augie Fackler <augie@google.com>
date Sat, 17 Feb 2018 00:29:23 -0500
parents c69e78ef2b54
children d3fa5e106e65
files mercurial/scmutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Sat Feb 17 13:55:12 2018 -0700
+++ b/mercurial/scmutil.py	Sat Feb 17 00:29:23 2018 -0500
@@ -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]