Patchwork D7196: py3: fix fsmonitor's _handleunavailable exception message encoding

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

Comments

phabricator - Nov. 1, 2019, 4:47 p.m.
touilleMan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS




To: touilleMan, #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
@@ -208,8 +208,8 @@ 
     if isinstance(ex, watchmanclient.Unavailable):
         # experimental config: fsmonitor.verbose
         if ex.warn and ui.configbool(b'fsmonitor', b'verbose'):
-            if b'illegal_fstypes' not in str(ex):
-                ui.warn(str(ex) + b'\n')
+            if b'illegal_fstypes' not in forcebytestr(ex):
+                ui.warn(forcebytestr(ex) + b'\n')
         if ex.invalidate:
             state.invalidate()
         # experimental config: fsmonitor.verbose