summaryrefslogtreecommitdiff
path: root/src/buildstream/buildelement.py
Commit message (Collapse)AuthorAgeFilesLines
* element.py: change 'substitute_variables' to take a 'ScalarNode' and renameBenjamin Schubert2019-10-161-2/+2
| | | | | | | | | Previously 'substitute_variable' would take a str, which would prevent us from doing nice error reporting. Using a 'ScalarNode' allows us to get our errors nicely. - rename it to 'node_subst_vars'. - add a nicer try-except around it in order to get nicer error reporting to users.
* node: Add 'get_str_list' on 'MappingNode'Benjamin Schubert2019-07-171-1/+1
| | | | | | `mapping.get_sequence(...).as_str_list()` is a very common pattern seen both in plugins and the core. Adding a helper to reduce the number of operations will make usage smoother
* _yaml: Remove 'node_validate' and replace by 'MappingNode.validate_keys'Benjamin Schubert2019-07-151-1/+1
| | | | - adapt all call sites to use the new API
* _yaml: Introduce 'get_sequence()' and 'sequence_at()'/'mapping_at()'Benjamin Schubert2019-07-151-8/+5
| | | | | | | | | - Adding 'get_sequence' on MappingNode to access sequences in a mapping - Adding 'sequence_at' on SequenceNode to access sequences in a sequence - Adding 'mapping_at' on SequenceNode to access mappings in a sequence Using "*_at" in sequences allows us to quickly understand if we are dealing with a sequence or a mapping.
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-211-0/+299
This was discussed in #1008. Fixes #1009.