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

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

Issue 2587493002: devil: Make provision_devices.py complain when no devices are available. (Closed)
Patch Set: comments Created 4 years 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 | devil/devil/android/tools/script_common.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/tools/provision_devices.py
diff --git a/devil/devil/android/tools/provision_devices.py b/devil/devil/android/tools/provision_devices.py
index 2c4406f0c35e69d54249a0057b81582697bd6409..71162c5f0cd690cf1869cdcf7df350e6f3591d76 100755
--- a/devil/devil/android/tools/provision_devices.py
+++ b/devil/devil/android/tools/provision_devices.py
@@ -87,7 +87,13 @@ def ProvisionDevices(
blacklist = (device_blacklist.Blacklist(blacklist_file)
if blacklist_file
else None)
- devices = script_common.GetDevices(devices, blacklist)
+ try:
+ devices = script_common.GetDevices(devices, blacklist)
+ except device_errors.NoDevicesError:
+ logging.error('No available devices to provision.')
+ if blacklist:
+ logging.error('Local device blacklist: %s', blacklist.Read())
+ raise
devices = [d for d in devices
if not emulators or d.adb.is_emulator]
parallel_devices = device_utils.DeviceUtils.parallel(devices)
@@ -573,6 +579,7 @@ def main(raw_args):
remove_system_webview=args.remove_system_webview,
wipe=not args.skip_wipe)
except (device_errors.DeviceUnreachableError, device_errors.NoDevicesError):
+ logging.exception('Unable to provision local devices.')
return exit_codes.INFRA
« no previous file with comments | « no previous file | devil/devil/android/tools/script_common.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698