gtristan commented on code in PR #1991:
URL: https://github.com/apache/buildstream/pull/1991#discussion_r2153783471
##########
src/buildstream/buildelement.py:
##########
@@ -227,9 +229,19 @@ def configure_dependencies(self, dependencies):
for dep in dependencies:
# Determine the location to stage each element, default is "/"
location = "/"
+
if dep.config:
- dep.config.validate_keys(["location"])
- location = dep.config.get_str("location")
+ dep.config.validate_keys(["digest-environment", "location"])
+
+ if "location" in dep.config:
+ location = dep.config.get_str("location")
+
+ if "digest-environment" in dep.config:
Review Comment:
Instead of doing a double dictionary lookup, we should use the default
`None` to `MappingNode.get_str()`.
```python
var_name = dep.config.get_str("digest-environment", None)
if var_name is not None:
element_list = blablabla
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]