Skip to content

Commit ea1769a

Browse files
committed
raise helpful error if missing bmp_path
1 parent 95bb72a commit ea1769a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_button/sprite_button.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def __init__(
5858
selected_bmp_path=None,
5959
transparent_index=None
6060
):
61+
if bmp_path is None:
62+
raise ValueError("Please supply bmp_path. It cannot be None.")
63+
6164
super().__init__(
6265
x=x,
6366
y=y,

0 commit comments

Comments
 (0)