Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Unified Diff: devil/devil/utils/lsusb.py

Issue 1637653002: [Android] Do not fail device_status_check if lsusb -v times out (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/utils/lsusb.py
diff --git a/devil/devil/utils/lsusb.py b/devil/devil/utils/lsusb.py
index 37bf4f2789a6910dff3dc417dcff402d242a8c7b..bb3609ef4f773254e4813c08ce79a45a2ce49c1c 100644
--- a/devil/devil/utils/lsusb.py
+++ b/devil/devil/utils/lsusb.py
@@ -87,7 +87,11 @@ def lsusb():
if m:
bus_num = m.group(1)
dev_num = m.group(2)
- devices.append(_lsusbv_on_device(bus_num, dev_num))
+ try:
+ devices.append(_lsusbv_on_device(bus_num, dev_num))
+ except cmd_helper.TimeoutError:
+ # Will be blacklisted if it is in expected device file, but times out.
+ logging.info('lsusb -v %s:%s timed out.', bus_num, dev_num)
return devices
def get_lsusb_serial(device):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698