From 7211b54e98f95b054fa0759fe22b263e3d6d0abd Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Mon, 20 Dec 2021 12:23:17 +0000 Subject: [PATCH] UC8159: Check EEPROM is not None --- library/inky/inky_uc8159.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/inky/inky_uc8159.py b/library/inky/inky_uc8159.py index 24aa9c4b..49446f97 100644 --- a/library/inky/inky_uc8159.py +++ b/library/inky/inky_uc8159.py @@ -140,7 +140,7 @@ def __init__(self, resolution=(600, 448), colour='multi', cs_pin=CS0_PIN, dc_pin # Check for supported display variant and select the correct resolution # Eg: 600x480 and 640x400 - if self.eeprom.display_variant in (14, 15): + if self.eeprom is not None and self.eeprom.display_variant in (14, 15): eeprom_resolution = _RESOLUTION.keys[self.eeprom.display_variant - 14] self.resolution = eeprom_resolution self.width, self.height = eeprom_resolution