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

login
register
mail settings
Submitter phabricator
Date Nov. 4, 2019, 9:53 p.m.
Message ID <42f791e45cc7350b61cef298e428174e@localhost.localdomain>
Download mbox | patch
Permalink /patch/42731/
State Not Applicable
Headers show

Comments

phabricator - Nov. 4, 2019, 9:53 p.m.
Closed by commit rHG90fba2248693: fsmonitor: use stringutil.forcebytestr() instead of str() on an exception (authored by Kwan).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7218?vs=17533&id=17537

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7218/new/

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",