Read about our upcoming Code of Conduct on this issue

Commit 9a5c08c2 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

py3: convert exceptions to bytes using pycompat.bytestr()

parent f0ecf2137824
......@@ -666,7 +666,7 @@ def _patchtocommit(ui, repo, old, fp, message=None, extras=None):
patch.patchrepo(ui, repo, pold, store, fp, 1, '',
files=files, eolmode=None)
except patch.PatchError as err:
raise error.Abort(str(err))
raise error.Abort(pycompat.bytestr(err))
finally:
del fp
......
......@@ -8,6 +8,7 @@ from mercurial import (
error,
node,
phases,
pycompat,
obsolete,
util,
)
......@@ -204,7 +205,7 @@ class stack(object):
return 0
except error.ManyMergeDestAbort as exc:
# XXX we should make it easier for upstream to provide the information
self.behinderror = str(exc).split('-', 1)[0].rstrip()
self.behinderror = pycompat.bytestr(exc).split('-', 1)[0].rstrip()
return -1
return 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment