rm-hull / luma.led_matrix

Python module to drive LED Matrices & 7-segment displays (MAX7219) and RGB NeoPixels (WS2812 / APA102)
https://luma-led-matrix.readthedocs.io
MIT License
523 stars 157 forks source link

Raise errors instead of using asserts #48

Closed thijstriemstra closed 7 years ago

thijstriemstra commented 8 years ago

For example for https://github.com/rm-hull/max7219/blob/master/max7219/led.py#L46:

if cascaded <= 0:
    raise ValueError("Must have at least one device! Got {0}".format(
        cascaded))
rm-hull commented 7 years ago

Closing this issue as it relates to the older deprecated version of the code