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/_options | |
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/_options')
-rw-r--r-- | src/buildstream/_options/optionpool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildstream/_options/optionpool.py b/src/buildstream/_options/optionpool.py index 9a4a88c36..713c9b056 100644 --- a/src/buildstream/_options/optionpool.py +++ b/src/buildstream/_options/optionpool.py @@ -267,7 +267,7 @@ class OptionPool(): _yaml.node_get_provenance(node, '(?)', indices=[i]) for i in range(len(conditions)) ] - _yaml.node_del(node, '(?)') + del node['(?)'] for condition, p in zip(conditions, provenance): tuples = list(_yaml.node_items(condition)) |