hdtools: servod: nicer warning error messaging for unrecognized device.

I recently add smarts for servod to figure out which board version and
rev its connected to.  There are few boards out in the field that may
not have their eeprom programmed correctly.

This CL makes it possible for users of those boards to continue to use
them w/o it being necessary to re-program the EEPROM.  The will need
to explicitly include the config files as servod will not be able to
determine that correctly.

BUG=none
TEST=manual,

run on mini-servo with missing iserial field

sudo servod
  2012-03-26 19:17:40,981 - servod-2.6 - WARNING - Unable to determine
  configs to load for board version = None

then fails w/

  servo.servod.ServodError: Must supply at least one config file ( -c
  <file> )

sudo servod -c miniservo.xml

launches

Change-Id: Ibe24632c9a3e6e4f5ffa2ee7afc4ae74bf861608
Reviewed-on: https://gerrit.chromium.org/gerrit/19110
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Ready: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Taylor Hutt <thutt@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
diff --git a/servo/servod.py b/servo/servod.py
index ed2c7e9..b74eb1d 100755
--- a/servo/servod.py
+++ b/servo/servod.py
@@ -157,7 +157,7 @@
 
   return None
 
-def get_auto_configs(servo):
+def get_auto_configs(logger, servo):
   """Get xml configs that should be loaded.
 
   Args:
@@ -169,6 +169,11 @@
   iserial = usb_get_iserial(servo)
   (lot_id, _) = iserial.split('-')
   board_version = get_board_version(lot_id)
+  logger.debug('iserial = %s board_version = %s', iserial, board_version)
+  if board_version not in ftdi_common.SERVO_CONFIG_DEFAULTS:
+    logger.warning('Unable to determine configs to load for board version = %s',
+                 board_version)
+    return []
   return ftdi_common.SERVO_CONFIG_DEFAULTS[board_version]
 
 def main():
@@ -200,7 +205,7 @@
 
   all_configs = []
   if not options.noautoconfig:
-    all_configs += get_auto_configs(servo_device)
+    all_configs += get_auto_configs(logger, servo_device)
 
   if options.config:
     for config in options.config: