8000 [issue-580] RDF: don't output relationship comment if there is none · spdx/tools-python@fab555d · GitHub
[go: up one dir, main page]

Skip to content

Commit fab555d

Browse files
[issue-580] RDF: don't output relationship comment if there is none
Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
1 parent 64b5561 commit fab555d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/spdx/writer/rdf/relationship_writer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def add_relationship_to_graph(
4141
),
4242
)
4343
)
44-
graph.add((relationship_node, RDFS.comment, Literal(relationship.comment)))
44+
if relationship.comment:
45+
graph.add((relationship_node, RDFS.comment, Literal(relationship.comment)))
4546
relationship_resource = URIRef(
4647
add_namespace_to_spdx_id(relationship.spdx_element_id, doc_namespace, external_doc_ref_to_namespace)
4748
)

0 commit comments

Comments
 (0)
0