Remove check for empty string, as unset variable is None.

This commit is contained in:
jpmeijers 2017-03-05 01:04:25 +01:00
parent 205785cf81
commit a450a654a0

2
run.py
View File

@ -249,7 +249,7 @@ while True:
# Reset the gateway board - this only works for the Raspberry Pi. # Reset the gateway board - this only works for the Raspberry Pi.
GPIO.setmode(GPIO.BOARD) # hardware pin numbers, just like gpio -1 GPIO.setmode(GPIO.BOARD) # hardware pin numbers, just like gpio -1
if (os.environ.get("GW_RESET_PIN")!="" and os.environ.get("GW_RESET_PIN")!=None): if (os.environ.get("GW_RESET_PIN")!=None):
try: try:
pin_number = int(os.environ.get("GW_RESET_PIN")) pin_number = int(os.environ.get("GW_RESET_PIN"))
print ("[TTN Gateway]: Resetting concentrator on pin "+os.environ.get("GW_RESET")) print ("[TTN Gateway]: Resetting concentrator on pin "+os.environ.get("GW_RESET"))