Skip to content

Commit 854e185

Browse files
pkoscikdkalowsk
authored andcommitted
west: spdx: make SBOM generation compatible with Python < 3.12
Avoid f-strings with backslashes for Python < 3.12 compatibility, which fixes SBOM generation crashes on older Python versions. Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
1 parent dda5786 commit 854e185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/west_commands/zspdx/scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def scanDocument(cfg, doc):
241241
f.licenseInfoInFile = splitExpression(expression)
242242

243243
if copyrights := getCopyrightInfo(f.abspath):
244-
f.copyrightText = f"<text>\n{'\n'.join(copyrights)}\n</text>"
244+
f.copyrightText = "<text>\n" + "\n".join(copyrights) + "\n</text>"
245245

246246
# check if any custom license IDs should be flagged for document
247247
for lic in f.licenseInfoInFile:

0 commit comments

Comments
 (0)