binman: Drop algo check in CheckSetHashValue()

The CheckAddHashValue() function is always called before this one, so
the algorithm check is never used. Replace it with an assert to avoid a
coverage error.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-04-10 06:43:02 -06:00
committed by Tom Rini
parent d664c29ec3
commit 702b7a3e2e

View File

@@ -411,8 +411,7 @@ def CheckSetHashValue(node, get_data_func):
m = hashlib.sha256()
m.update(get_data_func())
data = m.digest()
if data is None:
raise ValueError(f"Node '{node.path}': Unknown hash algorithm '{algo}'")
assert data
for n in GetUpdateNodes(hash_node):
n.SetData('value', data)