Mercurial > hg-stable
changeset 30653:b0a0f7b9ed90
fsmonitor: fix exception message scraping
pywatchman.CommandError formats its error message such that
'unable to resolve root' is not a prefix. This change fixes that by
instead just searching for it as a substring.
author | zphricz <zack.hricz@oculus.com> |
---|---|
date | Wed, 21 Dec 2016 13:51:34 -0800 |
parents | 2cab496db1e0 |
children | ae37e395a110 |
files | hgext/fsmonitor/watchmanclient.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fsmonitor/watchmanclient.py Wed Dec 21 13:44:15 2016 -0800 +++ b/hgext/fsmonitor/watchmanclient.py Wed Dec 21 13:51:34 2016 -0800 @@ -87,7 +87,7 @@ useImmutableBser=True) return self._watchmanclient.query(*watchmanargs) except pywatchman.CommandError as ex: - if ex.msg.startswith('unable to resolve root'): + if 'unable to resolve root' in ex.msg: raise WatchmanNoRoot(self._root, ex.msg) raise Unavailable(ex.msg) except pywatchman.WatchmanError as ex: