in case no scheduler.json, prevent internal server err

This commit is contained in:
Justin 2023-04-24 19:49:29 +08:00 committed by GitHub
parent c2e6199f61
commit 83c2bb4e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,7 @@ def index():
scheduler_settings = json.load(f)
f.close()
except:
scheduler_settings = ''
scheduler_settings = {"shutdown": {"hour": "00", "minute": "00", "enabled": False}, "reboot":{"hour": "00", "minute": "00", "enabled": False}, "timezone": "GMT"}
try: # incase this doesnt exist
api_keys = api_key2[1]