Badger2040W: Fix very slow and very wrong __getattr__.
This commit is contained in:
parent
a02834be9e
commit
15dabdba1f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue