On unhandled exceptions, blink the feather LED repeatedly

This commit is contained in:
Josh Klar
2018-09-03 15:20:27 -07:00
parent 96368c4632
commit ea18655a21
2 changed files with 12 additions and 10 deletions

View File

@@ -1,4 +1,12 @@
import sys
from kmk.circuitpython.util import feather_red_led_flash
from kmk_keyboard_user import main
if __name__ == '__main__':
main()
try:
main()
except Exception as e:
sys.print_exception(e)
feather_red_led_flash(duration=10, rate=0.5)
sys.exit(1)