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

Unified Diff: scripts/slave/recipe_config_types.py

Issue 1111413005: Some changes to allow recipes and modules to live noncentrally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Review comments Created 5 years, 7 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_api.py ('k') | scripts/slave/recipe_loader.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_config_types.py
diff --git a/scripts/slave/recipe_config_types.py b/scripts/slave/recipe_config_types.py
index 41701f94720d32a6dba07c4a0b36429ada5645c3..7aeef826e55e71acbabe23313ed456c160340cb8 100644
--- a/scripts/slave/recipe_config_types.py
+++ b/scripts/slave/recipe_config_types.py
@@ -9,6 +9,10 @@ from collections import namedtuple
from infra.libs import infra_types
+
+RECIPE_MODULE_PREFIX = 'RECIPE_MODULES'
+
+
def ResetTostringFns():
RecipeConfigType._TOSTRING_MAP.clear() # pylint: disable=W0212
@@ -84,12 +88,10 @@ class NamedBasePath(BasePath, namedtuple('NamedBasePath', 'name')):
class ModuleBasePath(BasePath, namedtuple('ModuleBasePath', 'module')):
- # All recipe modules are in a magic RECIPE_MODULES package. Remove it
- # before rendering MODULE[_] form.
- MODULE_PREFIX_RE = r'^RECIPE_MODULES\.'
-
def __repr__(self):
- name = re.sub(self.MODULE_PREFIX_RE, '', self.module.__name__)
+ prefix = '%s.' % RECIPE_MODULE_PREFIX
+ assert self.module.__name__.startswith(prefix)
+ name = self.module.__name__[len(prefix):]
return 'RECIPE_MODULE[%s]' % name
« no previous file with comments | « scripts/slave/recipe_api.py ('k') | scripts/slave/recipe_loader.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698