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

Unified Diff: scripts/slave/recipe_modules/chromite/api.py

Issue 2324733005: BuildBucket recipe module can expose properties. (Closed)
Patch Set: Remove parenthesis. 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
« no previous file with comments | « scripts/slave/recipe_modules/chromite/__init__.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromite/api.py
diff --git a/scripts/slave/recipe_modules/chromite/api.py b/scripts/slave/recipe_modules/chromite/api.py
index 43482d2049bf61d51dea4f5c14a6e4f96d4fc6bf..db25c1ec2978ffe01d68b472a5d33b869e7f290c 100644
--- a/scripts/slave/recipe_modules/chromite/api.py
+++ b/scripts/slave/recipe_modules/chromite/api.py
@@ -70,9 +70,9 @@ class ChromiteApi(recipe_api.RecipeApi):
if 'buildnumber' in self.m.properties:
defaults['CBB_BUILD_NUMBER'] = int(self.m.properties['buildnumber'])
- if 'buildbucket' in self.m.properties:
- buildbucket_json = self.m.json.loads(self.m.properties.get('buildbucket'))
- defaults['CBB_BUILDBUCKET_ID'] = buildbucket_json['build']['id']
+ buildbucket_props = self.m.buildbucket.properties
+ if buildbucket_props:
+ defaults['CBB_BUILDBUCKET_ID'] = buildbucket_props['build']['id']
return defaults
« no previous file with comments | « scripts/slave/recipe_modules/chromite/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698