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

Unified Diff: recipes.py

Issue 2253943003: Formally define step config, pass to stream. (Closed) Base URL: https://github.com/luci/recipes-py@nest-single-event
Patch Set: Rebase Created 4 years, 3 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: recipes.py
diff --git a/recipes.py b/recipes.py
index ee1e1b2dcf08d356cb2460055703e64c9f477eb3..e839b59f78cd7011e2bab640b09aa978d2ee863a 100755
--- a/recipes.py
+++ b/recipes.py
@@ -64,18 +64,18 @@ def handle_recipe_return(recipe_result, result_filename, stream_engine):
if result_filename:
with open(result_filename, 'w') as f:
f.write(result_string)
- with stream_engine.new_step_stream('recipe result') as s:
+ with stream_engine.make_step_stream('recipe result') as s:
with s.new_log_stream('result') as l:
l.write_split(result_string)
if 'traceback' in recipe_result.result:
- with stream_engine.new_step_stream('Uncaught Exception') as s:
+ with stream_engine.make_step_stream('Uncaught Exception') as s:
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:
+ with stream_engine.make_step_stream('Failure reason') as s:
with s.new_log_stream('reason') as l:
for line in recipe_result.result['reason'].splitlines():
l.write_line(line)

Powered by Google App Engine
This is Rietveld 408576698