dts: edtlib: Simplify 'category: optional' code in Device._prop_val()
Reuse Device.enabled(). Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
c0c8dd1b85
commit
f7f0e0adf9
1 changed files with 1 additions and 4 deletions
|
@ -578,10 +578,7 @@ class Device:
|
|||
|
||||
prop = node.props.get(name)
|
||||
if not prop:
|
||||
if not optional and \
|
||||
("status" not in node.props or
|
||||
node.props["status"].to_string() != "disabled"):
|
||||
|
||||
if not optional and self.enabled:
|
||||
_err("'{}' is marked as required in 'properties:' in {}, but "
|
||||
"does not appear in {!r}".format(
|
||||
name, self.binding_path, node))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue