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

Unified Diff: recipe_engine/run.py

Issue 2934583003: [step] Remove config indirection. (Closed)
Patch Set: cleanup Created 3 years, 6 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
Index: recipe_engine/run.py
diff --git a/recipe_engine/run.py b/recipe_engine/run.py
index 074c90a8c36b10544492730ef1adb9cc7d2f0173..479e310934f98cb827d564a87f5a0d8231764efc 100644
--- a/recipe_engine/run.py
+++ b/recipe_engine/run.py
@@ -274,20 +274,19 @@ class RecipeEngine(object):
if step_result.retcode in step_config.ok_ret:
step_result.presentation.status = 'SUCCESS'
return step_result
+ if not step_config.infra_step:
iannucci 2017/06/12 18:20:08 newline above
dnj 2017/06/12 19:00:03 Done.
+ state = 'FAILURE'
+ exc = recipe_api.StepFailure
else:
- if not step_config.infra_step:
- state = 'FAILURE'
- exc = recipe_api.StepFailure
- else:
- state = 'EXCEPTION'
- exc = recipe_api.InfraFailure
+ state = 'EXCEPTION'
+ exc = recipe_api.InfraFailure
- step_result.presentation.status = state
+ step_result.presentation.status = state
- self._step_stack[-1].open_step.stream.write_line(
- 'step returned non-zero exit code: %d' % step_result.retcode)
+ self._step_stack[-1].open_step.stream.write_line(
+ 'step returned non-zero exit code: %d' % step_result.retcode)
- raise exc(step_config.name, step_result)
+ raise exc(step_config.name, step_result)
def run(self, recipe_script, api, properties):
"""Run a recipe represented by a recipe_script object.

Powered by Google App Engine
This is Rietveld 408576698