Chromium Code Reviews| Index: scripts/slave/recipe_modules/bot_update/api.py |
| diff --git a/scripts/slave/recipe_modules/bot_update/api.py b/scripts/slave/recipe_modules/bot_update/api.py |
| index 60059009073dcb2d90f5c50f5c2bfae64c6a85b8..987b27bdd849e36ea02ed645e6adb3a8fa8a1637 100644 |
| --- a/scripts/slave/recipe_modules/bot_update/api.py |
| +++ b/scripts/slave/recipe_modules/bot_update/api.py |
| @@ -48,6 +48,10 @@ def jsonish_to_python(spec, is_top=False): |
| class BotUpdateApi(recipe_api.RecipeApi): |
| + def __init__(self, *args, **kwargs): |
| + self._properties = None |
| + super(BotUpdateApi, self).__init__(*args, **kwargs) |
| + |
| def __call__(self, name, cmd, **kwargs): |
| """Wrapper for easy calling of bot_update.""" |
| assert isinstance(cmd, (list, tuple)) |
| @@ -55,6 +59,10 @@ class BotUpdateApi(recipe_api.RecipeApi): |
| 'scripts', 'slave', 'bot_update.py') |
| return self.m.python(name, bot_update_path, cmd, **kwargs) |
| + @property |
| + def properties(self): |
| + return self._properties |
| + |
| def ensure_checkout(self, gclient_config=None, suffix=None, |
| patch=True, update_presentation=True, |
| force=False, patch_root=None, no_shallow=False, |
| @@ -158,11 +166,13 @@ class BotUpdateApi(recipe_api.RecipeApi): |
| finally: |
| step_result = self.m.step.active_result |
| + if 'properties' in step_result.json.output: |
| + self._properties = step_result.json.output['properties'] |
| + |
| if update_presentation: |
| # Set properties such as got_revision. |
| if 'properties' in step_result.json.output: |
|
agable
2014/08/14 00:34:14
If you default self._properties to {} instead of N
Dirk Pranke
2014/08/14 00:39:45
Good suggestion. Updated.
|
| - properties = step_result.json.output['properties'] |
| - for prop_name, prop_value in properties.iteritems(): |
| + for prop_name, prop_value in self.properties.iteritems(): |
| step_result.presentation.properties[prop_name] = prop_value |
| # Add helpful step description in the step UI. |
| if 'step_text' in step_result.json.output: |