Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def print_bootloader_help():
"""Prints the available bootloaders listed in docs.qmk.fm.
"""
cli.log.info('Here are the available bootloaders:')
cli.echo('\tdfu')
cli.echo('\tdfu-ee')
cli.echo('\tdfu-split-left')
cli.echo('\tdfu-split-right')
cli.echo('\tavrdude')
cli.echo('\tBootloadHID')
cli.echo('\tdfu-util')
cli.echo('\tdfu-util-split-left')
cli.echo('\tdfu-util-split-right')
cli.echo('\tst-link-cli')
cli.echo('For more info, visit https://docs.qmk.fm/#/flashing')
if default is not None:
prompt = '%s [%s] ' % (prompt, default)
while True:
print()
answer = input(format_ansi(prompt % args))
print()
if answer:
if confirm:
if yesno('Is the answer "%s" correct?', answer, default=True):
try:
return answer_type(answer)
except Exception as e:
cli.log.error('Could not convert answer (%s) to type %s: %s', answer, answer_type.__name__, str(e))
else:
try:
return answer_type(answer)
except Exception as e:
cli.log.error('Could not convert answer (%s) to type %s: %s', answer, answer_type.__name__, str(e))
elif default is not None:
return default