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 <s...@chromium.org> --- (no changes since v1) tools/binman/state.py | 3 +-- 1 file changed, 1 insertion(+), 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) -- 2.43.0