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

Unified Diff: appengine/findit/findit_api.py

Issue 2382103005: [Findit] Check for availability of try-job result. (Closed)
Patch Set: Created 4 years, 2 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: appengine/findit/findit_api.py
diff --git a/appengine/findit/findit_api.py b/appengine/findit/findit_api.py
index 6b665ec339a192a54ab91c316f01358476ca2894..6e25276a7d4756c75941a339dc292dd070e2614d 100644
--- a/appengine/findit/findit_api.py
+++ b/appengine/findit/findit_api.py
@@ -136,8 +136,13 @@ class FindItApi(remote.Service):
return None
if build_failure_type == failure_type.COMPILE:
+ if not try_job.compile_results: # pragma: no cover.
+ return None
return try_job.compile_results[-1].get('culprit', {}).get(step_name)
+ if not try_job.test_results: # pragma: no cover.
+ return None
+
if test_name is None:
step_info = try_job.test_results[-1].get('culprit', {}).get(step_name)
if not step_info or step_info.get('tests'): # pragma: no cover.
« 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