Skip to content
Snippets Groups Projects
Commit 65c37b431e76 authored by Emmanuel Leblond's avatar Emmanuel Leblond
Browse files

py3: fix fsmonitor's _watchmantofsencoding exception message encoding

Differential Revision: https://phab.mercurial-scm.org/D7190
parent de2c8722a787
No related branches found
No related tags found
No related merge requests found
......@@ -246,8 +246,10 @@
try:
decoded = path.decode(_watchmanencoding)
except UnicodeDecodeError as e:
raise error.Abort(str(e), hint=b'watchman encoding error')
raise error.Abort(
stringutil.forcebytestr(e), hint=b'watchman encoding error'
)
try:
encoded = decoded.encode(_fsencoding, 'strict')
except UnicodeEncodeError as e:
......@@ -250,8 +252,8 @@
try:
encoded = decoded.encode(_fsencoding, 'strict')
except UnicodeEncodeError as e:
raise error.Abort(str(e))
raise error.Abort(stringutil.forcebytestr(e))
return encoded
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment