mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
dtoc: Improve internal error for Refresh()
Add the node name too so it is easy to see which node failed. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5ff9fedc9b
commit
acd98611c3
@ -339,8 +339,8 @@ class Node:
|
||||
p = fdt_obj.get_property_by_offset(poffset)
|
||||
prop = self.props.get(p.name)
|
||||
if not prop:
|
||||
raise ValueError("Internal error, property '%s' missing, "
|
||||
'offset %d' % (p.name, poffset))
|
||||
raise ValueError("Internal error, node '%s' property '%s' missing, "
|
||||
'offset %d' % (self.path, p.name, poffset))
|
||||
prop.RefreshOffset(poffset)
|
||||
poffset = fdt_obj.next_property_offset(poffset, QUIET_NOTFOUND)
|
||||
|
||||
|
@ -209,7 +209,7 @@ class TestNode(unittest.TestCase):
|
||||
del self.node.props['notstring']
|
||||
with self.assertRaises(ValueError) as e:
|
||||
self.dtb.Refresh()
|
||||
self.assertIn("Internal error, property 'notstring' missing, offset ",
|
||||
self.assertIn("Internal error, node '/spl-test' property 'notstring' missing, offset ",
|
||||
str(e.exception))
|
||||
|
||||
def testLookupPhandle(self):
|
||||
|
Loading…
Reference in New Issue
Block a user