From edf74c95c00217dac9efafe5abf09150f5800bc9 Mon Sep 17 00:00:00 2001 From: Rich Date: Mon, 11 Apr 2016 20:47:42 -0400 Subject: [PATCH] Added exception catch for IOError... and the previous commit actually had file code stuff there too oops. --- hue_off.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hue_off.py b/hue_off.py index 5635b43..31943c3 100755 --- a/hue_off.py +++ b/hue_off.py @@ -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()