10000 [issue-580] RDF: don't output relationship comment if there is none by armintaenzertng · Pull Request #581 · spdx/tools-python · GitHub
[go: up one dir, main page]

Skip to content

[issue-580] RDF: don't output relationship comment if there is none #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[issue-580] RDF: don't output relationship comment if there is none
Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
  • Loading branch information
armintaenzertng committed Apr 13, 2023
commit fa0c209a1def55e1ceffd739a933ed0873b6fa22
3 changes: 2 additions & 1 deletion src/spdx/writer/rdf/relationship_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def add_relationship_to_graph(
),
)
)
graph.add((relationship_node, RDFS.comment, Literal(relationship.comment)))
if relationship.comment:
graph.add((relationship_node, RDFS.comment, Literal(relationship.comment)))
relationship_resource = URIRef(
add_namespace_to_spdx_id(relationship.spdx_element_id, doc_namespace, external_doc_ref_to_namespace)
)
Expand Down
0