Added exception catch for IOError... and the previous commit actually had file code stuff there too oops.
This commit is contained in:
1 parent
c59b8a12fc
commit
edf74c95c0
1 file changed
+2
@@ -101,6 +101,8 @@ def main(argv):
|
||||
off_lights.append(light)
|
||||
lights_file.write(light)
|
||||
lights_file.write("\n")
|
||||
except IOError:
|
||||
print "%s: File IO Error" % datestamp()
|
||||
except:
|
||||
# Bridge unavailable, Power failure?
|
||||
print "%s: Connection to Hue Bridge has failed... is the power out?" % datestamp()
|
||||
|
||||
Reference in new issue
Block a user