-
- Downloads
There was a problem fetching the pipeline summary.
Catch attempts to compose a list
Attempting to compose a list property would result in an unhandled exception: AttributeError: 'CommentedSeq' object has no attribute 'get' We now at least detect the situation and produce an exception that the frontend will report neatly: Error loading pipeline: element.bst [line 11 column 4]: Only values of type 'dict' can be composed. I was getting this error from an attempt to conditionally extend the sources list: sources: (?): arch == "x86_64": - url: http://example.com/x86_64 The correct way to do this is to move the conditional into the parent dict, e.g.: (?): arch == "x86_64": sources: - url: https://example.com/x86_64 It would be nice if the error message could hint at how the user can do what they want, but it doesn't seem possible in this case.
Showing
- buildstream/_yaml.py 7 additions, 3 deletionsbuildstream/_yaml.py
- tests/format/list-directive-type-error/element.bst 6 additions, 0 deletionstests/format/list-directive-type-error/element.bst
- tests/format/list-directive-type-error/project.conf 7 additions, 0 deletionstests/format/list-directive-type-error/project.conf
- tests/format/listdirectiveerrors.py 15 additions, 0 deletionstests/format/listdirectiveerrors.py
Loading
Please register or sign in to comment