summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-06 18:47:29 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-06-07 16:38:57 +0000
commit8fdb444aa6043fda4ad5cc92d502c4b9b95fa5e9 (patch)
tree3a0e1d9867882f416970e50da8459e16a20bbad3
parent59d13fb44be2fed00cd673ddf9064a4de500fcb3 (diff)
downloadbuildstream-8fdb444aa6043fda4ad5cc92d502c4b9b95fa5e9.tar.gz
_yaml: Don't check for none node in __trim_list_provenance
By being more restrictive when creating new nodes, we can remove checks for not-node values.
-rw-r--r--src/buildstream/_yaml.pyx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/_yaml.pyx b/src/buildstream/_yaml.pyx
index 4e0659f40..edad3fbee 100644
--- a/src/buildstream/_yaml.pyx
+++ b/src/buildstream/_yaml.pyx
@@ -596,9 +596,9 @@ cpdef object node_get(Node node, object expected_type, str key, list indices=Non
cdef list __trim_list_provenance(list value):
cdef list ret = []
+ cdef Node entry
+
for entry in value:
- if type(entry) is not Node:
- entry = Node(entry, _SYNTHETIC_FILE_INDEX, 0, 0)
if type(entry.value) is list:
ret.append(__trim_list_provenance(entry.value))
elif type(entry.value) is dict: