Catching exception when checking for existance of firmware programmer utilities.

Ignoring the exception that occurs when checking for the existance of some
required utilties for the fw programmer.

Currently the firmware programmer is not working or used, and the check is
blocking us from running tests in environments that do not package the required
dependent bins.

We should reinstate this exception once the programmer is working to indicate
the missing utilities earlier in the test cycle, rather than hitting the
exception when they are called.

BUG=chromium:370288,chromium:371011
TEST=Manually at desk with/without require bins, and saw the expected msg.

Change-Id: Idbfbe1a43f65e0cda22a7f7c8814f431dfa6f124
Reviewed-on: https://chromium-review.googlesource.com/198307
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Yusuf Mohsinally <mohsinally@chromium.org>
Commit-Queue: Yusuf Mohsinally <mohsinally@chromium.org>
Tested-by: Yusuf Mohsinally <mohsinally@chromium.org>
diff --git a/server/cros/servo/firmware_programmer.py b/server/cros/servo/firmware_programmer.py
index f9c5c32..457e3a5 100644
--- a/server/cros/servo/firmware_programmer.py
+++ b/server/cros/servo/firmware_programmer.py
@@ -14,6 +14,7 @@
 import logging
 import os
 
+from autotest_lib.client.common_lib import error
 from autotest_lib.server.cros.faft.config.config import Config as FAFTConfig
 
 
@@ -47,10 +48,17 @@
         self._servo_prog_state = ()
         self._servo_saved_state = []
         self._program_cmd = ''
-        # These will fail if the utilities are not available, we want the
-        # failure happen before run_once() is invoked.
-        self._servo.system('which %s' % ' '.join(req_list))
-
+        try:
+            self._servo.system('which %s' % ' '.join(req_list))
+        except error.AutoservRunError:
+            # TODO: We turn this exception into a warn since the fw programmer
+            # is not working right now, and some systems do not package the
+            # required utilities its checking for.
+            # We should reinstate this exception once the programmer is working
+            # to indicate the missing utilities earlier in the test cycle.
+            # Bug chromium:371011 filed to track this.
+            logging.warn("Ignoring exception when verify required bins : %s",
+                         ' '.join(req_list))
 
     def _set_servo_state(self):
         """Set servo for programming, while saving the current state."""