diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-07-08 14:22:19 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-13 17:06:03 +0000 |
commit | 331ea002e16c1209e1eddf57c01400b7ff4ac02e (patch) | |
tree | 0dc3933e35417500dc9b92cfc722058df17f859e /extra/usb_serial | |
parent | b330c438eed93c2dddecfe767a1bacfca4883227 (diff) | |
download | chrome-ec-331ea002e16c1209e1eddf57c01400b7ff4ac02e.tar.gz |
ec: Fix some bad formatting and warnings
The black formatting revealed some odd formatting.
Fixed all errors from cros lint.
find . \( -path ./private -prune \) -o -name '*.py' -print | \
xargs cros lint -v |& grep ": E"
BRANCH=None
BUG=b:238434058
TEST=None
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ia1d2e9cfb0cd2b7000d15b3b918d24881987673e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749249
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'extra/usb_serial')
-rwxr-xr-x | extra/usb_serial/console.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/extra/usb_serial/console.py b/extra/usb_serial/console.py index c08cb72092..839330d86a 100755 --- a/extra/usb_serial/console.py +++ b/extra/usb_serial/console.py @@ -2,10 +2,6 @@ # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# -# Ignore indention messages, since legacy scripts use 2 spaces instead of 4. -# pylint: disable=bad-indentation,docstring-section-indent -# pylint: disable=docstring-trailing-quotes """Allow creation of uart/console interface via usb google serial endpoint.""" @@ -23,7 +19,7 @@ import time import tty try: - import usb + import usb # pylint:disable=import-error except ModuleNotFoundError: print("import usb failed") print("try running these commands:") @@ -113,12 +109,7 @@ class Susb: try: dev = dev_list[0] except: - try: - dev = dev_list.next() - except: - raise SusbError( - "USB device %04x:%04x not found" % (vendor, product) - ) + raise SusbError("USB device %04x:%04x not found" % (vendor, product)) # If we can't set configuration, it's already been set. try: |