Badger2040W: Fix very slow and very wrong __getattr__.

pull/633/head
Phil Howard 2023-01-18 10:06:30 +00:00 zatwierdzone przez Phil Howard
rodzic a02834be9e
commit 15dabdba1f
1 zmienionych plików z 1 dodań i 6 usunięć

Wyświetl plik

@ -72,12 +72,7 @@ class Badger2040W():
def __getattr__(self, item):
# Glue to redirect calls to PicoGraphics
if item in dir(self.display):
return getattr(self.display, item)
elif item in self.__dict__.keys():
return getattr(self, item)
else:
raise AttributeError(f"No attribute '{item}'")
return getattr(self.display, item)
def led(self, brightness):
pass