Skip to content

Commit e7df27d

Browse files
fholgerarmintaenzertng
authored andcommitted
SPDX 2 to 3 conversion should not fail if external_document_refs are empty
Signed-off-by: Holger Frydrych <holger.frydrych@tngtech.com>
1 parent 279e095 commit e7df27d

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/spdx_tools/spdx3/bump_from_spdx2/creation_info.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ def bump_creation_info(spdx2_creation_info: Spdx2_CreationInfo, payload: Payload
1919

2020
print_missing_conversion("creation_info.document_namespace", 0, "https://github.com/spdx/spdx-3-model/issues/87")
2121

22-
namespaces, imports = zip(
23-
*[
24-
bump_external_document_ref(external_document_ref)
25-
for external_document_ref in spdx2_creation_info.external_document_refs
26-
]
22+
namespaces, imports = (
23+
zip(
24+
*[
25+
bump_external_document_ref(external_document_ref)
26+
for external_document_ref in spdx2_creation_info.external_document_refs
27+
]
28+
)
29+
if spdx2_creation_info.external_document_refs
30+
else ([], [])
2731
)
2832
namespaces = list(namespaces)
2933
imports = list(imports)

0 commit comments

Comments
 (0)