From fa75ca0fa65efd77802c17c06938ea61523878e2 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 10 Aug 2022 13:55:11 -0400 Subject: [PATCH] handle no .auto-brightness --- adafruit_pyoa.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adafruit_pyoa.py b/adafruit_pyoa.py index e0faf4c..d8be062 100755 --- a/adafruit_pyoa.py +++ b/adafruit_pyoa.py @@ -87,7 +87,10 @@ def __init__(self) -> None: self._background_file = None self._wavfile = None - self._display.auto_brightness = False + try: + self._display.auto_brightness = False + except AttributeError: + pass self.backlight_fade(0) self._display.show(self.root_group) self.touchscreen = None