From patchwork Tue Jan 14 16:13:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7855: fsmonitor: properly handle str ex.msg From: phabricator X-Patchwork-Id: 44318 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 14 Jan 2020 16:13:49 +0000 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 To: indygreg, #hg-reviewers, pulkit Cc: mercurial-devel 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))