diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-06-25 17:51:36 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-15 14:14:02 +0000 |
commit | a275c823f07fb6d737ba7288056abce1599eecec (patch) | |
tree | ed159afda3e837535c08d916577f615049d479f0 /src/buildstream/_includes.py | |
parent | bb3c8045cd89a7c4d1d7cd2e03736496dd449fb9 (diff) | |
download | buildstream-a275c823f07fb6d737ba7288056abce1599eecec.tar.gz |
_yaml: Remove 'node_del' and support `del mapping[key]`
- Also add a convenience method 'safe_del' catching the exception
when we don't care if the value was there or not.
Diffstat (limited to 'src/buildstream/_includes.py')
-rw-r--r-- | src/buildstream/_includes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_includes.py b/src/buildstream/_includes.py index f74ea85be..f63e56213 100644 --- a/src/buildstream/_includes.py +++ b/src/buildstream/_includes.py @@ -44,7 +44,7 @@ class Includes: includes = includes_node.as_str_list() include_provenance = _yaml.node_get_provenance(node, key='(@)') - _yaml.node_del(node, '(@)') + del node['(@)'] for include in reversed(includes): if only_local and ':' in include: |