Skip to content

Commit f9b95d2

Browse files
authored
Merge pull request #37 from adafruit/jepler-patch-1
Update how board.DISPLAY is checked
2 parents 1befbbb + b4c5f77 commit f9b95d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_bitmapsaver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def save_pixels(
168168
:param palette: the Palette to use for looking up colors in the bitmap
169169
"""
170170
if not pixel_source:
171-
if not hasattr(board, "DISPLAY"):
171+
if not getattr(board, "DISPLAY", None):
172172
raise ValueError("Second argument must be a Bitmap or Display")
173173
pixel_source = board.DISPLAY
174174

0 commit comments

Comments
 (0)