fsmonitor: use stringutil.forcebytestr() instead of str() on an exception stable
authorIan Moody <moz-ian@perix.co.uk>
Mon, 04 Nov 2019 19:05:44 +0000
branchstable
changeset 43403 90fba2248693
parent 43402 40bf3d7ecc42
child 43404 a69772d2f3c3
fsmonitor: use stringutil.forcebytestr() instead of str() on an exception Similar to 5fa8ac91190e / D7206, should get test-install.t passing on py3. Differential Revision: https://phab.mercurial-scm.org/D7218
hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py	Mon Nov 04 16:13:01 2019 +0100
+++ b/hgext/fsmonitor/__init__.py	Mon Nov 04 19:05:44 2019 +0000
@@ -193,7 +193,7 @@
             pycompat.bytestr(v["version"]),
         )
     except watchmanclient.Unavailable as e:
-        err = str(e)
+        err = stringutil.forcebytestr(e)
     fm.condwrite(
         err,
         b"fsmonitor-watchman-error",