edtlib: wrap DTError
Don't let a malformed devicetree escape as a DTError. Wrap it in an EDTError instead, so callers can just rely on the edtlib APIs as is generally expected. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
7738977af4
commit
6c65b15ce6
1 changed files with 4 additions and 1 deletions
|
@ -201,7 +201,10 @@ class EDT:
|
|||
self.dts_path = dts
|
||||
self.bindings_dirs = bindings_dirs
|
||||
|
||||
try:
|
||||
self._dt = DT(dts)
|
||||
except DTError as e:
|
||||
raise EDTError(e) from e
|
||||
_check_dt(self._dt)
|
||||
|
||||
self._init_compat2binding()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue