catch NotImplementedError when using bitbanged pins

On the Pi / CPython, I'm getting NotImplementedError here rather than ValueError.
This pull makes the assumption that ValueError is still necessary on CircuitPython.
This commit is contained in:
Brennen Bearnes 2018-10-10 14:06:45 -06:00
parent cd5053419c
commit 2f5d69172a

View file

@ -83,7 +83,8 @@ class DotStar:
while not self._spi.try_lock():
pass
self._spi.configure(baudrate=4000000)
except ValueError:
except (NotImplementedError, ValueError) as e:
self.dpin = digitalio.DigitalInOut(data)
self.cpin = digitalio.DigitalInOut(clock)
self.dpin.direction = digitalio.Direction.OUTPUT