Removed IOError exception. Writing light name to file is working. Now need to read in and find light nased on name

This commit is contained in:
rich committed 2016-04-11 21:18:38 -04:00
1 parent edf74c95c0
commit a86b733ccb
1 file changed
+4 -5
+4 -5
View File
@@ -99,13 +99,12 @@ def main(argv):
for light in lights_list:
if not light.on:
off_lights.append(light)
lights_file.write(light)
lights_file.write(light.name)
lights_file.write("\n")
except IOError:
print "%s: File IO Error" % datestamp()
lights_file.close()
except:
# Bridge unavailable, Power failure?
print "%s: Connection to Hue Bridge has failed... is the power out?" % datestamp()
# Unhandled exception!
print "%s: An Unhandled exception has appeared..." % datestamp()
#Pause
time.sleep(check_interval)