servod: vendor and product arguments broken |
||
Issue descriptionThis morning my servod didn't really want to cooperate. I usually have --vendor and --product in my command line because servod frequently wants to open my other ftdi devices at my desk. This morning: "sudo servod --vendor 0x18d1 --product 0x5002 -b cheza" yielded usage: servod.... servod: error: argument --vendor: invalid int value: '0x18d1' Something must have changed in the argument parsing code where it doesn't like hex values anymore. I checked out a version of servod from 2 months ago, it seems fine (even though the parser.add_option code still says type=int). Ruben, could you please take a look?
,
Oct 3
review here https://crrev.com/c/1258722 Could you try this out and let me know if it successfully addresses your issue?
,
Oct 3
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/a3fe8e9fdd51f6a2e9e42383c9dcadf74fa64025 commit a3fe8e9fdd51f6a2e9e42383c9dcadf74fa64025 Author: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Date: Wed Oct 03 20:59:03 2018 servod: allow hex input for vid/pid in parser This replaces the type "int" for --vendor/--product cmdline arguments with the type lambda x: int(x,0) to ensure that hex values also get converted to ints. BUG= chromium:891359 TEST=manual test (Before the change) sudo servod --vendor 0x9181 servod: error: argument --vendor: invalid int value: '0x9181' (After the change) sudo servod --vendor 0x9181 2018-10-03 09:52:43,518 - servod - INFO - Start ... Change-Id: I85634d777578c5551776b1c9341dbfd046c993cd Reviewed-on: https://chromium-review.googlesource.com/1258722 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Alexandru M Stan <amstan@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> [modify] https://crrev.com/a3fe8e9fdd51f6a2e9e42383c9dcadf74fa64025/servo/servod.py
,
Nov 2
|
||
►
Sign in to add a comment |
||
Comment 1 by coconutruben@chromium.org
, Oct 3