Patchwork D7218: fsmonitor: use stringutil.forcebytestr() instead of str() on an exception

login
register
mail settings
Submitter phabricator
Date Nov. 4, 2019, 7:06 p.m.
Message ID <differential-rev-PHID-DREV-tjh3piruhumbngv4wift-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42727/
State Superseded
Headers show

Comments

phabricator - Nov. 4, 2019, 7:06 p.m.
Kwan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Similar to 5fa8ac91190e <https://phab.mercurial-scm.org/rHG5fa8ac91190e1f5ae879497323710184273abc0d> / D7206 <https://phab.mercurial-scm.org/D7206>, should get test-install.t passing on py3.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D7218

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS




To: Kwan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -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",