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

Unified Diff: recipes.py

Issue 2142833002: Set proper result (purple/red) for "Uncaught Exception" and "Failure reason" steps (Closed) Base URL: https://github.com/luci/recipes-py.git@master
Patch Set: Created 4 years, 5 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: recipes.py
diff --git a/recipes.py b/recipes.py
index 76538112434b5984c09571a7226edac1c1428773..9b070afb04e738d221cafc93b4a1d5815b521539 100755
--- a/recipes.py
+++ b/recipes.py
@@ -67,12 +67,14 @@ def handle_recipe_return(recipe_result, result_filename, stream_engine):
if 'traceback' in recipe_result.result:
with stream_engine.new_step_stream('Uncaught Exception') as s:
+ s.set_step_status('EXCEPTION')
with s.new_log_stream('exception') as l:
for line in recipe_result.result['traceback']:
l.write_line(line)
if 'reason' in recipe_result.result:
with stream_engine.new_step_stream('Failure reason') as s:
+ s.set_step_status('FAILURE')
with s.new_log_stream('reason') as l:
for line in recipe_result.result['reason'].splitlines():
l.write_line(line)
« 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