1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

leave Pi GPIO pins in a sensible state on error

This commit is contained in:
Dave Conway-Jones 2016-10-11 15:37:34 +01:00
parent fad63c0c18
commit fdea19a45b

View File

@ -89,6 +89,9 @@ if len(sys.argv) > 2:
GPIO.cleanup(pin)
sys.exit(0)
except:
if len(sys.argv) == 4:
data = int(sys.argv[3])
else:
data = 0
if data != 0:
data = 1