Bug 1384241 - Review comment: Expect errors installing pywatchman with pip. r=gps
MozReview-Commit-ID: 6Z0e0uKM39v
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -314,17 +314,24 @@ class Watch(MachCommandBase):
@CommandArgument('-v', '--verbose', action='store_true',
help='Verbose output for what commands the watcher is running.')
@CommandArgument('-p', '--port',
default=8080,
help='Port to listen for WebSocket connections on.')
def watch(self, port=8080, verbose=False):
"""Watch and re-build the source tree."""
self._activate_virtualenv()
- self.virtualenv_manager.install_pip_package('pywatchman==1.3.0')
+
+ try:
+ self.virtualenv_manager.install_pip_package('pywatchman==1.3.0')
+ except:
+ print('Could not install pywatchman from pip. See '
+ 'https://developer.mozilla.org/en-US/docs/TODO_DOCUMENTATION_URL')
+ return 1
+
self.virtualenv_manager.install_pip_package('bottle==0.12.13')
self.virtualenv_manager.install_pip_package('gevent-websocket==0.10.1')
import mozbuild.faster_daemon as faster_daemon
import mozbuild.faster_daemon_server as server
daemon = faster_daemon.Daemon(self.config_environment)