Skip to content

Commit

Permalink
fixup! adapt code to new spdx-tools release
Browse files Browse the repository at this point in the history
Signed-off-by: Meret Behrens <[email protected]>
  • Loading branch information
meretp committed Jan 17, 2023
1 parent a000d7c commit 5c7c4a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/formattedcode/output_spdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from io import BytesIO
from io import StringIO

from spdx.checksum import Checksum, ChecksumAlgorithm
from spdx.checksum import Checksum
from spdx.checksum import ChecksumAlgorithm
from spdx.creationinfo import Tool
from spdx.document import ExtractedLicense
from spdx.document import Document
Expand Down Expand Up @@ -359,10 +360,10 @@ def write_spdx(
file_entry.copyright = SPDXNone()

doc.add_file(file_entry)
relationship = Relationship(package.spdx_id + " CONTAINS " + file_entry.spdx_id)
relationship = Relationship(f'{package.spdx_id} CONTAINS {file_entry.spdx_id}')
doc.add_relationship(relationship)

if len(doc.files) == 0:
if not doc.files:
if as_tagvalue:
msg = "# No results for package '{}'.\n".format(package.name)
else:
Expand Down

0 comments on commit 5c7c4a8

Please sign in to comment.