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

Unified Diff: recipe_modules/step/api.py

Issue 2668113002: step: expose get_context() to get the context object (Closed)
Patch Set: Created 3 years, 11 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: recipe_modules/step/api.py
diff --git a/recipe_modules/step/api.py b/recipe_modules/step/api.py
index 8530f6ffdafcd8d71d8595732653e2a08a79fa7c..60c2f784654661486f4bf30c56272086ce80b223 100644
--- a/recipe_modules/step/api.py
+++ b/recipe_modules/step/api.py
@@ -77,6 +77,9 @@ class StepApi(recipe_api.RecipeApiPlain):
""" See recipe_api.py for docs. """
return recipe_api.context
+ def get_context(self):
+ return recipe_api._STEP_CONTEXT
iannucci 2017/01/31 22:12:51 this should return a copy of the step context (unl
iannucci 2017/01/31 22:14:49 This is also confusing with the previous property.
+
@contextlib.contextmanager
def nest(self, name):
"""Nest is the high-level interface to annotated hierarchical steps.
@@ -172,7 +175,7 @@ class StepApi(recipe_api.RecipeApiPlain):
kwargs['ok_ret'] = ok_ret
# Obtain information from composite step parent.
- compositor = recipe_api._STEP_CONTEXT
+ compositor = self.get_context()
# Calculate our full step name. If a step already has that name, add an
# index to the end of it.
« 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