summaryrefslogtreecommitdiff
path: root/tools/binman/state.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-04-10 06:43:02 -0600
committerTom Rini <trini@konsulko.com>2025-04-11 14:29:52 -0600
commit702b7a3e2eb49b144936e061c0107518544c4b1a (patch)
tree663a1af49fc5ad6c653d6838b81463f2f2c966f6 /tools/binman/state.py
parentd664c29ec37964db5e191debb2cafeed3a170255 (diff)
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>
Diffstat (limited to 'tools/binman/state.py')
-rw-r--r--tools/binman/state.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/binman/state.py b/tools/binman/state.py
index 6772d3678fe..f4d885c772a 100644
--- a/tools/binman/state.py
+++ b/tools/binman/state.py
@@ -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)