# HG changeset patch # User zphricz # Date 2016-12-21 21:51:34 # Node ID b0a0f7b9ed9007a3f1323f9417efad715489e918 # Parent 2cab496db1e05e739feba2d6d3c431695a74c9f7 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. diff --git a/hgext/fsmonitor/watchmanclient.py b/hgext/fsmonitor/watchmanclient.py --- a/hgext/fsmonitor/watchmanclient.py +++ b/hgext/fsmonitor/watchmanclient.py @@ -87,7 +87,7 @@ class client(object): 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: