We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1befbbb + b4c5f77 commit f9b95d2Copy full SHA for f9b95d2
adafruit_bitmapsaver.py
@@ -168,7 +168,7 @@ def save_pixels(
168
:param palette: the Palette to use for looking up colors in the bitmap
169
"""
170
if not pixel_source:
171
- if not hasattr(board, "DISPLAY"):
+ if not getattr(board, "DISPLAY", None):
172
raise ValueError("Second argument must be a Bitmap or Display")
173
pixel_source = board.DISPLAY
174
0 commit comments