-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix issue with setting external references (in
bom granularity
)
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# ------------------------------------------------------------------------------- | ||
# Copyright (c) 2023-2024 Siemens | ||
# Copyright (c) 2023-2025 Siemens | ||
# All Rights Reserved. | ||
# Author: [email protected] | ||
# | ||
|
@@ -124,10 +124,16 @@ def get_ext_ref(comp: Component, type: ExternalReferenceType, comment: str) -> O | |
@staticmethod | ||
def set_ext_ref(comp: Component, type: ExternalReferenceType, comment: str, value: str, | ||
hash_algo: str = "", hash: str = "") -> None: | ||
ext_ref = ExternalReference( | ||
type=type, | ||
url=XsUri(value), | ||
comment=comment) | ||
if isinstance(value, XsUri): | ||
ext_ref = ExternalReference( | ||
type=type, | ||
url=value, | ||
comment=comment) | ||
else: | ||
ext_ref = ExternalReference( | ||
type=type, | ||
url=XsUri(value), | ||
comment=comment) | ||
|
||
if hash_algo and hash: | ||
ext_ref.hashes.add(HashType( | ||
|