scripts: ci: Fix crash when vendor list is malformed
Also introduces friendly error message. Signed-off-by: Vinicius Miguel <vmiguel1@gmail.com>
This commit is contained in:
parent
894c5c8ae5
commit
0492235d0d
1 changed files with 6 additions and 2 deletions
|
@ -264,8 +264,12 @@ class BoardYmlCheck(ComplianceTest):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if not line or line.startswith("#"):
|
if not line or line.startswith("#"):
|
||||||
continue
|
continue
|
||||||
vendor, _ = line.split("\t", 2)
|
try:
|
||||||
vendor_prefixes.append(vendor)
|
vendor, _ = line.split("\t", 2)
|
||||||
|
vendor_prefixes.append(vendor)
|
||||||
|
except ValueError:
|
||||||
|
self.error(f"Invalid line in vendor-prefixes.txt:\"{line}\".")
|
||||||
|
self.error("Did you forget the tab character?")
|
||||||
|
|
||||||
path = Path(ZEPHYR_BASE)
|
path = Path(ZEPHYR_BASE)
|
||||||
for file in path.glob("**/board.yml"):
|
for file in path.glob("**/board.yml"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue