[issue-650] raise ParsingError if elements don't have an SPDXID#652
[issue-650] raise ParsingError if elements don't have an SPDXID#652
Conversation
armintaenzertng
left a comment
There was a problem hiding this comment.
Thanks for the fix, I have a couple of questions, though.
| # code that follows | ||
| value = graph.value(subject=subject, predicate=predicate, object=_object, default=default, any=_any) | ||
| if value and not isinstance(value, (URIRef, Literal, BNode)): | ||
| if value != _any and value and not isinstance(value, (URIRef, Literal, BNode)): |
There was a problem hiding this comment.
I don't get the value != _any part here. _any is a bool, why should it be equal to value?
There was a problem hiding this comment.
Yeah, sorry, mixed the values here. This needs to be value != default. While working on this I noticed that an error about wrong types would be logged if a package has no files_analyzed field. This is as the changes you commented below not related to the origin issue and rather a fix for the wrapper methods introduced with #563. Shall I create a separate PR for these changes?
There was a problem hiding this comment.
Yes, please do :)
There was a problem hiding this comment.
#653
The PR should be merged first as the test in this PR fails without these changes.
492af03 to
ecdd0d1
Compare
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
ecdd0d1 to
0f41ee0
Compare
fixes #650