Skip to content

Commit 09b1eaf

Browse files
Don't use bare-except
1 parent 849dde8 commit 09b1eaf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Macropad_Hotkeys/code.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
key sequences.
77
"""
88

9-
# pylint: disable=import-error, unused-import, too-few-public-methods, bare-except
9+
# pylint: disable=import-error, unused-import, too-few-public-methods
1010

1111
import os
1212
import board
@@ -91,7 +91,8 @@ def switch(self):
9191
try:
9292
module = __import__(MACRO_FOLDER + '/' + FILENAME[:-3])
9393
APPS.append(App(module.app))
94-
except:
94+
except (SyntaxError, ImportError, AttributeError, KeyError, NameError,
95+
IndexError, TypeError) as err:
9596
pass
9697

9798
if not APPS:

0 commit comments

Comments
 (0)