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

Unified Diff: recipe_modules/properties/api.py

Issue 2710923003: Include slavename in properties.legacy() (Closed)
Patch Set: Created 3 years, 10 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/properties/api.py
diff --git a/recipe_modules/properties/api.py b/recipe_modules/properties/api.py
index 305b5d1698061a4cbc747e48ba6e91ae33079645..b11f41b900173b9597dc38411a9dde2a448c0ad4 100644
--- a/recipe_modules/properties/api.py
+++ b/recipe_modules/properties/api.py
@@ -42,7 +42,7 @@ class PropertiesApi(recipe_api.RecipeApiPlain, collections.Mapping):
return iter(self._properties)
def legacy(self): # pragma: no cover
- """Returns a reduced set of properties, possibly used by legacy scripts."""
+ """Returns a set of properties, possibly used by legacy scripts."""
# Add all properties to this blacklist that are required for testing, but
# not used by any lecacy scripts, in order to avoid vast expecation
@@ -50,7 +50,10 @@ class PropertiesApi(recipe_api.RecipeApiPlain, collections.Mapping):
blacklist = set([
'buildbotURL',
])
- return {k: v for k, v in self.iteritems() if k not in blacklist}
+ props = {k: v for k, v in self.iteritems() if k not in blacklist}
+ if props.get('bot_id') and not props.get('slavename'):
+ props['slavename'] = props['bot_id']
+ return props
def thaw(self):
"""Returns a vanilla python jsonish dictionary of properties."""
« 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