summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin David <valentin.david@codethink.co.uk>2019-09-03 11:20:18 +0200
committerValentin David <valentin.david@codethink.co.uk>2019-09-03 11:21:05 +0200
commit124a4224d210ee857adcbfa10df26dc31f396661 (patch)
tree6979ccd61430817ef55572e567a501482c7f7c42
parente8a10cfbe1339eebf792a653bfee8cc820411b42 (diff)
downloadbuildstream-valentindavid/update-requirements-1.4.tar.gz
Fix an invalid deletion of potentially non-existant yaml fieldvalentindavid/update-requirements-1.4
-rw-r--r--buildstream/_loader/loadelement.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/_loader/loadelement.py b/buildstream/_loader/loadelement.py
index 0b38cad65..d90e4fe44 100644
--- a/buildstream/_loader/loadelement.py
+++ b/buildstream/_loader/loadelement.py
@@ -152,6 +152,7 @@ def _extract_depends_from_node(node, *, key=None):
output_deps.append(dependency)
# Now delete the field, we dont want it anymore
- del node[key]
+ if key in node:
+ del node[key]
return output_deps