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

Unified Diff: recipe_engine/run.py

Issue 2995543003: [recipe_engine] Set presentation.status before OutputPlaceholder.result. (Closed)
Patch Set: Created 3 years, 4 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 | recipe_engine/types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/run.py
diff --git a/recipe_engine/run.py b/recipe_engine/run.py
index 96e4253604c9377203b7f154e46f36fc3b924757..84cd8d0b3554e8582654827a112f52b15827e642 100644
--- a/recipe_engine/run.py
+++ b/recipe_engine/run.py
@@ -272,19 +272,13 @@ class RecipeEngine(object):
self._step_stack[-1] = (
self._step_stack[-1]._replace(step_result=step_result))
- if step_result.retcode in step_config.ok_ret:
- step_result.presentation.status = 'SUCCESS'
+ if step_result.presentation.status == 'SUCCESS':
return step_result
- if not step_config.infra_step:
- state = 'FAILURE'
- exc = recipe_api.StepFailure
- else:
- state = 'EXCEPTION'
+ exc = recipe_api.StepFailure
+ if step_result.presentation.status == 'EXCEPTION':
exc = recipe_api.InfraFailure
- step_result.presentation.status = state
-
self._step_stack[-1].open_step.stream.write_line(
'step returned non-zero exit code: %d' % step_result.retcode)
« no previous file with comments | « no previous file | recipe_engine/types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698