Tools: fixed board selection in build_binaries.py

This commit is contained in:
Andrew Tridgell 2019-03-11 15:55:57 +11:00
parent 13e3c2fa92
commit 57ab496a1c
1 changed files with 5 additions and 2 deletions

View File

@ -150,9 +150,12 @@ is bob we will attempt to checkout bob-AVR'''
try:
out = self.run_program('waf', ['./waf', 'configure', '--board=BOARDTEST'], False)
lines = out.split('\n')
needle = "BOARDTEST' (choose from"
needles = ["BOARDTEST' (choose from", "BOARDTEST': choices are"]
for line in lines:
idx = line.find(needle)
for needle in needles:
idx = line.find(needle)
if idx != -1:
break
if idx != -1:
line = line[idx+len(needle):-1]
line = line.replace("'","")