INNER CODE UNIT · Python
input_board
xoseperez/espurna · code/ota.py:225
def input_board(devices):
"""
Grabs info from the user about what device to flash
"""
# Choose the board
try:
index = int(
input("Choose the board you want to flash (empty if none of these): ")
)
except ValueError:
index = 0
if index < 0 or len(devices) < index:
print("Board number must be between 1 and {}\n".format(str(len(devices))))
return None
board = get_board_by_index(devices, index)