Badger2040W: Fix very slow and very wrong __getattr__.

This commit is contained in:
Phil Howard 2023-01-18 10:06:30 +00:00 committed by Phil Howard
parent a02834be9e
commit 15dabdba1f
1 changed files with 1 additions and 6 deletions

View File

@ -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