Allow TrafficLights, RGBLED and Motor to be constructed using GPIO 0

This commit is contained in:
Andrew Scheller
2016-06-10 11:49:53 +01:00
parent a20e03527c
commit 382966e4e4
2 changed files with 3 additions and 3 deletions

View File

@@ -569,7 +569,7 @@ class TrafficLights(LEDBoard):
"""
def __init__(self, red=None, amber=None, green=None,
pwm=False, initial_value=False):
if not all([red, amber, green]):
if not all(p is not None for p in [red, amber, green]):
raise GPIOPinMissing(
'red, amber and green pins must be provided'
)