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()
|
||||
if not line or line.startswith("#"):
|
||||
continue
|
||||
vendor, _ = line.split("\t", 2)
|
||||
vendor_prefixes.append(vendor)
|
||||
try:
|
||||
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)
|
||||
for file in path.glob("**/board.yml"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue