diff options
author | Benjamin Schubert <contact@benschubert.me> | 2019-06-25 21:14:40 +0100 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-06-27 15:08:11 +0100 |
commit | 4e66ca802766545084018441b2a2ddda81c34f2f (patch) | |
tree | 6b1c532cb502a78ca769d73c71ddbf724dad3d08 /src/buildstream/element.py | |
parent | 4652bfa0cbd86bdf24dae416b75c2607e5edcd41 (diff) | |
download | buildstream-bschubert/node-api-keys.tar.gz |
_yaml: Remove 'node_items' and add 'MappingNode.items()'bschubert/node-api-keys
One difference is that 'MappingNode.items()' does not strip the
provenance from scalars and lists, which ends up not affecting the
code much.
Diffstat (limited to 'src/buildstream/element.py')
-rw-r--r-- | src/buildstream/element.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 242fe7b25..13a4b88ef 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -2700,10 +2700,10 @@ class Element(Plugin): element_splits = element_bst.get_mapping('split-rules', default={}) # Resolve any variables in the public split rules directly - for domain, splits in self.node_items(element_splits): + for domain, splits in element_splits.items(): splits = [ self.__variables.subst(split.strip()) - for split in splits + for split in splits.as_str_list() ] _yaml.node_set(element_splits, domain, splits) @@ -2713,8 +2713,8 @@ class Element(Plugin): bstdata = self.get_public_data('bst') splits = bstdata.get_mapping('split-rules') self.__splits = { - domain: re.compile('^(?:' + '|'.join([utils._glob2re(r) for r in rules]) + ')$') - for domain, rules in self.node_items(splits) + domain: re.compile('^(?:' + '|'.join([utils._glob2re(r) for r in rules.as_str_list()]) + ')$') + for domain, rules in splits.items() } # __split_filter(): |