aboutsummaryrefslogtreecommitdiff
path: root/cros_utils
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2018-12-06 10:52:01 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-08 11:23:22 -0800
commitc1baa8ddb3ef0e674bf6634f4522fe338bee5fa8 (patch)
tree340896a492186f145ae2f2657e18edf7df2775a2 /cros_utils
parent6535cc843c4860246fb455d147b1b282e2b72c87 (diff)
downloadtoolchain-utils-c1baa8ddb3ef0e674bf6634f4522fe338bee5fa8.tar.gz
toolchain-utils: Handle the missing artifact_url error more gracefully.
Mark status as fail if artifact_url field is null. This will make the builder errors easier to spot. BUG=chromium:912617 TEST=Tested a dummy job. Change-Id: I5896ce00a7b9f9a9b27329e1f509560b8e27d56f Reviewed-on: https://chromium-review.googlesource.com/1366375 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org>
Diffstat (limited to 'cros_utils')
-rw-r--r--cros_utils/buildbot_utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cros_utils/buildbot_utils.py b/cros_utils/buildbot_utils.py
index a25fbcae..87be13cb 100644
--- a/cros_utils/buildbot_utils.py
+++ b/cros_utils/buildbot_utils.py
@@ -59,6 +59,10 @@ def PeekTrybotImage(chromeos_root, buildbucket_id):
results = json.loads(out)[buildbucket_id]
+ # Handle the case where the tryjob failed to launch correctly.
+ if results['artifacts_url'] is None:
+ return (results['status'], '')
+
return (results['status'], results['artifacts_url'].rstrip('/'))