| Index: recipe_engine/config_types.py
|
| diff --git a/recipe_engine/config_types.py b/recipe_engine/config_types.py
|
| index 6b9891eab3adc4d9bb5a226b87e10423bfe0f41c..2afac8eeab3c56c3e7ac245e0ddcd72f5d2c633e 100644
|
| --- a/recipe_engine/config_types.py
|
| +++ b/recipe_engine/config_types.py
|
| @@ -80,17 +80,6 @@ class BasePath(object):
|
|
|
|
|
| class NamedBasePath(BasePath, namedtuple('NamedBasePath', 'name')):
|
| - # Restrict basenames to '[ALL_CAPS]'. This will help catch
|
| - # errors if someone attempts to provide an actual string path '/some/example'
|
| - # as the 'base'.
|
| - BASE_RE = re.compile(r'\[([A-Z][A-Z_]*)\]')
|
| -
|
| - @staticmethod
|
| - def parse(base):
|
| - base_match = NamedBasePath.BASE_RE.match(base)
|
| - assert base_match, 'Base should be [ALL_CAPS], got %r' % base
|
| - return NamedBasePath(base_match.group(1).lower())
|
| -
|
| def resolve(self, api, test_enabled):
|
| if self.name in api.c.dynamic_paths:
|
| return api.c.dynamic_paths[self.name]
|
| @@ -154,17 +143,12 @@ class Path(RecipeConfigType):
|
| by the 'platform' module), to a suffix for the path.
|
| """
|
| super(Path, self).__init__()
|
| + assert isinstance(base, BasePath), base
|
| assert all(isinstance(x, basestring) for x in pieces), pieces
|
| assert not any(x in ('..', '.', '/', '\\') for x in pieces)
|
| - self.pieces = pieces
|
| -
|
| - if isinstance(base, BasePath):
|
| - self.base = base
|
| - elif isinstance(base, basestring):
|
| - self.base = NamedBasePath.parse(base)
|
| - else:
|
| - raise ValueError('%s is not a valid base path' % (base,))
|
|
|
| + self.base = base
|
| + self.pieces = pieces
|
| self.platform_ext = kwargs.get('platform_ext', {})
|
|
|
| def __eq__(self, other):
|
|
|