You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:47:33 UTC

[buildstream] 01/10: buildstream/_loader/loadelement.py: Fix crash with some elements that do not have depends

This is an automated email from the ASF dual-hosted git repository.

root pushed a commit to branch valentindavid/update_mirror
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit f539ccbab5f3555fec6003bbdf985c18c0114231
Author: Valentin David <va...@codethink.co.uk>
AuthorDate: Thu Apr 26 09:51:50 2018 +0200

    buildstream/_loader/loadelement.py: Fix crash with some elements that do not have depends
---
 buildstream/_loader/loadelement.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/buildstream/_loader/loadelement.py b/buildstream/_loader/loadelement.py
index b270fbe..247955e 100644
--- a/buildstream/_loader/loadelement.py
+++ b/buildstream/_loader/loadelement.py
@@ -167,6 +167,7 @@ def _extract_depends_from_node(node):
         output_deps.append(dependency)
 
     # Now delete "depends", we dont want it anymore
-    del node[Symbol.DEPENDS]
+    if Symbol.DEPENDS in node:
+        del node[Symbol.DEPENDS]
 
     return output_deps