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:
1 parent
edf74c95c0
commit
a86b733ccb
1 file changed
+4
-5
+4
-5
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user