mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
binman: Correct the error message for a bad hash algorithm
This shows an internal type at present, rather than the algorithm name. Fix it and update the test to catch this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
parent
730922205b
commit
8db1f9958f
2 changed files with 2 additions and 2 deletions
|
@ -2076,7 +2076,7 @@ class TestFunctional(unittest.TestCase):
|
|||
def testHashBadAlgo(self):
|
||||
with self.assertRaises(ValueError) as e:
|
||||
self._DoReadFileDtb('092_hash_bad_algo.dts', update_dtb=True)
|
||||
self.assertIn("Node '/binman/u-boot': Unknown hash algorithm",
|
||||
self.assertIn("Node '/binman/u-boot': Unknown hash algorithm 'invalid'",
|
||||
str(e.exception))
|
||||
|
||||
def testHashSection(self):
|
||||
|
|
|
@ -397,7 +397,7 @@ def CheckAddHashProp(node):
|
|||
if algo.value == 'sha256':
|
||||
size = 32
|
||||
else:
|
||||
return "Unknown hash algorithm '%s'" % algo
|
||||
return "Unknown hash algorithm '%s'" % algo.value
|
||||
for n in GetUpdateNodes(hash_node):
|
||||
n.AddEmptyProp('value', size)
|
||||
|
||||
|
|
Loading…
Reference in a new issue