summaryrefslogtreecommitdiff
path: root/extra/usb_updater/fw_update.py
diff options
context:
space:
mode:
Diffstat (limited to 'extra/usb_updater/fw_update.py')
-rwxr-xr-xextra/usb_updater/fw_update.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/extra/usb_updater/fw_update.py b/extra/usb_updater/fw_update.py
index f05797bfb6..8658d92c48 100755
--- a/extra/usb_updater/fw_update.py
+++ b/extra/usb_updater/fw_update.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
# Upload firmware over USB
# Note: This is a py2/3 compatible file.
@@ -21,7 +17,8 @@ import sys
import time
from pprint import pprint
-import usb
+import usb # pylint:disable=import-error
+from ecusb.stm32usb import SusbError
debug = False
@@ -91,10 +88,7 @@ class Supdate(object):
if dev is None:
raise SusbError("USB device(%s) not found" % serialname)
else:
- try:
- dev = dev_list[0]
- except:
- dev = dev_list.next()
+ dev = dev_list[0]
debuglog("Found stm32: %04x:%04x" % (vendor, product))
self._dev = dev