Allowing progress if no value provide for arg usbkm232 to servod.
For keyboardless devices, they need a special keyboard handler which uses a
USB km232 cable to send keystrokes. The path to the usbkm232 device is provided
at startup time via a --usbkm232 command line argument.
For the board types that required this cable, we would raise an Exception if the
argument was not specified. However, in the lab, this cabling has not been
setup and so starting up of servod is blocked.
Replacing the exception with a warning message and returning the default
keyboard handler if the usbkm232 arg is not specified. Hopefully the only
effect is any tests that require using the keyboard control of the DUT will not
work correctly. These should only be the FAFT tests right now.
TEST=Tested at desk, starting up servod against --board=pather, without
specifying the usbkm232 arg.
Reviewed-by: Vic Yang <email@example.com>
Reviewed-by: Richard Barnette <firstname.lastname@example.org>
Tested-by: Yusuf Mohsinally <email@example.com>
Reviewed-by: Yusuf Mohsinally <firstname.lastname@example.org>
Commit-Queue: Yusuf Mohsinally <email@example.com>
diff --git a/servo/servo_server.py b/servo/servo_server.py
index 14cf911..4d489f2 100644
@@ -132,8 +132,10 @@
elif board in ('mccloud', 'monroe', 'panther', 'tricky', 'zako'):
if self._usbkm232 is None:
- raise Exception("No device specified when "
- "initializing usbkm232 keyboard handler")
+ logging.warn("No device path specified for usbkm232 handler. Returning "
+ "the DefaultHandler, which is likely the wrong keyboard "
+ "handler for the board type specified.")
+ return keyboard_handlers.DefaultHandler(servo)
return keyboard_handlers.USBkm232Handler(servo, self._usbkm232)