Skip to content

Commit e7dd165

Browse files
committed
fdt2: Properly print property names that cannot be found
1 parent 66c508c commit e7dd165

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fdt2.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ def subnode_or_none(self, parentoffset, name):
2727
return None
2828
return offset
2929

30+
def getprop(self, nodeoffset, prop_name, quiet=()):
31+
try:
32+
return super().getprop(nodeoffset, prop_name, quiet)
33+
except:
34+
print(f"ERROR: Failed to get property: {prop_name}")
35+
raise
36+
3037
def getprop_or_none(self, nodeoffset, prop_name):
3138
prop = self.getprop(nodeoffset, prop_name, [FDT_ERR_NOTFOUND])
3239
if prop == -FDT_ERR_NOTFOUND:

0 commit comments

Comments
 (0)