scripts: edtlib: fix werror for unknown vendor

Commit c4079e4be2
("scripts: rework edtlib warnings-turned-errors") was trying to abort
on unknown vendor prefix, but the error log is not fatal.

Fix it by using the same error handling function we use when aborting
due to deprecated property usage.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2021-08-03 10:26:51 -07:00 committed by Christopher Friedt
commit 9e8da8953c

View file

@ -524,10 +524,10 @@ class EDT:
vendor not in self._vendor_prefixes and \ vendor not in self._vendor_prefixes and \
vendor not in _VENDOR_PREFIX_ALLOWED: vendor not in _VENDOR_PREFIX_ALLOWED:
if self._werror: if self._werror:
log_fn = _LOG.error handler_fn = _err
else: else:
log_fn = _LOG.warning handler_fn = _LOG.warning
log_fn( handler_fn(
f"node '{node.path}' compatible '{compat}' " f"node '{node.path}' compatible '{compat}' "
f"has unknown vendor prefix '{vendor}'") f"has unknown vendor prefix '{vendor}'")