D7855: fsmonitor: properly handle str ex.msg
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Tue Jan 14 11:13:49 EST 2020
Closed by commit rHG18f9a534dfb7: fsmonitor: properly handle str ex.msg (authored by indygreg).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7855?vs=19196&id=19215
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7855/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7855
AFFECTED FILES
hgext/fsmonitor/watchmanclient.py
CHANGE DETAILS
diff --git a/hgext/fsmonitor/watchmanclient.py b/hgext/fsmonitor/watchmanclient.py
--- a/hgext/fsmonitor/watchmanclient.py
+++ b/hgext/fsmonitor/watchmanclient.py
@@ -105,11 +105,11 @@
)
return self._watchmanclient.query(*watchmanargs)
except pywatchman.CommandError as ex:
- if b'unable to resolve root' in ex.msg:
+ if 'unable to resolve root' in ex.msg:
raise WatchmanNoRoot(
self._root, stringutil.forcebytestr(ex.msg)
)
- raise Unavailable(ex.msg)
+ raise Unavailable(stringutil.forcebytestr(ex.msg))
except pywatchman.WatchmanError as ex:
raise Unavailable(stringutil.forcebytestr(ex))
To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list