From 25a78dbfba3fa96bd2a7e31c70a6d5c1eaa6c31a Mon Sep 17 00:00:00 2001 From: James Bithell Date: Mon, 19 Mar 2018 18:49:40 +0000 Subject: [PATCH] Very poor syntax corrected --- main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index dc9e988..2eff0b1 100644 --- a/main.py +++ b/main.py @@ -12,11 +12,10 @@ def log(message): print(message) -if os.environ.get('onlineButDormant', False) == "True": - while True: - #onlineButDormant, if set, makes the device do nothing except log the statement below every 12 hours. To get in/out of this mode, set the env paramater and restart the container - log("SleepMode for closure") - time.sleep(43200) #12 Hours +while os.environ.get('onlineButDormant', False) == "True": + #onlineButDormant, if set, makes the device do nothing except log the statement below every 12 hours. To get in/out of this mode, set the env paramater and restart the container + log("SleepMode for closure") + time.sleep(43200) #12 Hours def reboot(): #Use Resin.io api to reboot