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

Unified Diff: devil/devil/android/tools/device_status.py

Issue 2808763004: [devil] Raise DeviceUnreachableError on device not found (Closed)
Patch Set: match specific device Created 3 years, 8 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 | « devil/devil/android/tools/device_recovery.py ('k') | devil/devil/android/tools/provision_devices.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/tools/device_status.py
diff --git a/devil/devil/android/tools/device_status.py b/devil/devil/android/tools/device_status.py
index 167d66c4b51fce3333e657bbefd0f68b90b856bc..159c6c5dbced0866eecc8b29094db61d3a1b276f 100755
--- a/devil/devil/android/tools/device_status.py
+++ b/devil/devil/android/tools/device_status.py
@@ -51,7 +51,8 @@ def _BatteryStatus(device, blacklist):
if blacklist:
blacklist.Extend([device.adb.GetDeviceSerial()], reason='low_battery')
- except device_errors.CommandFailedError:
+ except (device_errors.CommandFailedError,
+ device_errors.DeviceUnreachableError):
logger.exception('Failed to get battery information for %s',
str(device))
@@ -66,7 +67,8 @@ def _IMEISlice(device):
m = _RE_DEVICE_ID.match(l)
if m:
imei_slice = m.group(1)[-6:]
- except device_errors.CommandFailedError:
+ except (device_errors.CommandFailedError,
+ device_errors.DeviceUnreachableError):
logger.exception('Failed to get IMEI slice for %s', str(device))
return imei_slice
@@ -143,7 +145,8 @@ def DeviceStatus(devices, blacklist):
'wifi_ip': wifi_ip,
})
- except device_errors.CommandFailedError:
+ except (device_errors.CommandFailedError,
+ device_errors.DeviceUnreachableError):
logger.exception('Failure while getting device status for %s.',
str(device))
if blacklist:
« no previous file with comments | « devil/devil/android/tools/device_recovery.py ('k') | devil/devil/android/tools/provision_devices.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698