Don't use bare-except
This commit is contained in:
parent
849dde8619
commit
09b1eaf644
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue