Added check for last input item in fanController main function

This commit is contained in:
2017-02-23 17:47:42 +01:00
parent 64c55a62a3
commit 682642c19e
3 changed files with 4 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ def turnFanOFF():
if __name__ == '__main__':
arg = argv[1]
arg = argv[-1]
if (arg == 'on'):
print(turnFanON())
elif (arg == 'off'):
@@ -48,4 +48,4 @@ if __name__ == '__main__':
elif (arg == 'get'):
print(getFanstate())
else:
print("Invalid input")
print("Invalid input")

Binary file not shown.