Don't use bare-except

This commit is contained in:
Phillip Burgess 2021-07-06 15:34:18 -07:00
parent 849dde8619
commit 09b1eaf644

View file

@ -6,7 +6,7 @@ use dial to select an application macro set, press MACROPAD keys to send
key sequences. key sequences.
""" """
# pylint: disable=import-error, unused-import, too-few-public-methods, bare-except # pylint: disable=import-error, unused-import, too-few-public-methods
import os import os
import board import board
@ -91,7 +91,8 @@ for FILENAME in FILES:
try: try:
module = __import__(MACRO_FOLDER + '/' + FILENAME[:-3]) module = __import__(MACRO_FOLDER + '/' + FILENAME[:-3])
APPS.append(App(module.app)) APPS.append(App(module.app))
except: except (SyntaxError, ImportError, AttributeError, KeyError, NameError,
IndexError, TypeError) as err:
pass pass
if not APPS: if not APPS: