Bug 1384241 - Review comment: Expect errors installing pywatchman with pip. r=gps draft
authorNick Alexander <nalexander@mozilla.com>
Wed, 26 Jul 2017 16:57:57 -0700
changeset 616495 9c44680ab95a60ed60d202c1a2f5c6c4128ba837
parent 616494 3a5d971f34417aa2827c5cbc06b82fe470bdd8a8
child 616496 fa928c88094fbb87cad3e461eaf92cade510be0b
push id70704
push usernalexander@mozilla.com
push dateThu, 27 Jul 2017 03:35:28 +0000
reviewersgps
bugs1384241
milestone56.0a1
Bug 1384241 - Review comment: Expect errors installing pywatchman with pip. r=gps MozReview-Commit-ID: 6Z0e0uKM39v
python/mozbuild/mozbuild/mach_commands.py
--- 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)