Commit ebe1f03b authored by Benjamin Schubert's avatar Benjamin Schubert

Merge branch 'bschubert/adapt-new-yaml-api' into 'freedesktop-sdk-18.08.31.1-bst2'

Adapt internal plugins for the new Bst2 YAML API

See merge request !1560
parents 2a1bf655 d78be55c
Pipeline #72662812 failed with stages
in 67 minutes and 10 seconds
......@@ -4,11 +4,9 @@ from buildstream import Element, ElementError, Scope
class CheckForbiddenElement(Element):
def configure(self, node):
self.node_validate(node, [
'forbidden'
])
node.validate_keys(['forbidden'])
self.forbidden = set(self.node_get_member(node, list, 'forbidden'))
self.forbidden = set(node.get_str_list('forbidden'))
def preflight(self):
pass
......
......@@ -15,9 +15,9 @@ class CrateSource(DownloadableFileSource):
def configure(self, node):
super().configure(node)
self.subdir = self.node_get_member(node, str, 'subdir', 'crates') or None
self.subdir = node.get_str('subdir', 'crates')
self.node_validate(node, DownloadableFileSource.COMMON_CONFIG_KEYS + ['subdir'])
node.validate_keys(DownloadableFileSource.COMMON_CONFIG_KEYS + ['subdir'])
def stage(self, directory):
crates = os.path.join(directory, self.subdir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment