Tools: blacklist build of ODID boards

these confuse users
This commit is contained in:
Andrew Tridgell 2022-08-19 18:51:38 +10:00
parent 4894cc1742
commit 6245b3aa16

View File

@ -2,6 +2,7 @@
import os import os
import re import re
import fnmatch
''' '''
list of boards for build_binaries.py and custom build server list of boards for build_binaries.py and custom build server
@ -24,6 +25,12 @@ class Board(object):
'Sub', 'Sub',
] ]
def in_blacklist(blacklist, b):
'''return true if board b is in the blacklist, including wildcards'''
for bl in blacklist:
if fnmatch.fnmatch(b, bl):
return True
return False
class BoardList(object): class BoardList(object):
@ -137,9 +144,10 @@ class BoardList(object):
"MazzyStarDrone", "MazzyStarDrone",
"omnibusf4pro-one", "omnibusf4pro-one",
"skyviper-f412-rev1", "skyviper-f412-rev1",
"*-ODID",
] ]
ret = filter(lambda x : x not in blacklist, ret) ret = filter(lambda x : not in_blacklist(blacklist, x), ret)
# if the caller has supplied a vehicle to limit to then we do that here: # if the caller has supplied a vehicle to limit to then we do that here:
if build_target is not None: if build_target is not None: