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

Unified Diff: recipe_engine/types.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: recipe_engine/types.py
diff --git a/recipe_engine/types.py b/recipe_engine/types.py
index b2ac39d25e376931f4da66b8625c6f0da80ec6de..7859af93324fd84ddec8419319ca5583c4927798 100644
--- a/recipe_engine/types.py
+++ b/recipe_engine/types.py
@@ -169,16 +169,16 @@ class StepDataAttributeError(AttributeError):
class StepData(object):
- def __init__(self, step, retcode):
+ def __init__(self, step_config, retcode):
+ self._step_config = step_config
self._retcode = retcode
- self._step = step
self._presentation = StepPresentation()
self.abort_reason = None
@property
def step(self):
- return copy.deepcopy(self._step)
+ return dict((k, v) for k, v in self._step_config._asdict().iteritems() if v)
@property
def retcode(self):
@@ -189,4 +189,4 @@ class StepData(object):
return self._presentation
def __getattr__(self, name):
- raise StepDataAttributeError(self._step['name'], name)
+ raise StepDataAttributeError(self._step_config.name, name)

Powered by Google App Engine
This is Rietveld 408576698