From 60dbe4dae7325097dca85c55ed24c634ede1364c Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Tue, 6 Oct 2020 21:55:34 +0200 Subject: [PATCH] Fixed default config --- default-presets.json | 16 ++++++++-------- modules/configloader/loader.py | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/default-presets.json b/default-presets.json index 619e55e..65cee0f 100644 --- a/default-presets.json +++ b/default-presets.json @@ -1,41 +1,41 @@ { "default": { - "color": {178, 199, 255}, + "color": [178, 199, 255], "brightness": 255 }, "dim": { - "color": {178, 199, 255}, + "color": [178, 199, 255], "brightness": 111 }, "dim": { - "color": {178, 199, 255}, + "color": [178, 199, 255], "brightness": 80 }, "red": { - "color": {255, 0, 0}, + "color": [255, 0, 0], "brightness": 255 }, "green": { - "color": {0, 255, 0}, + "color": [0, 255, 0], "brightness": 255 }, "blue": { - "color": {0, 0, 255}, + "color": [0, 0, 255], "brightness": 255 }, "ice" : { - "color": {80, 100, 255}, + "color": [80, 100, 255], "brightness": 120 }, "sleep": { - "color": {185, 155, 25}, + "color": [185, 155, 25], "brightness": 60 } } diff --git a/modules/configloader/loader.py b/modules/configloader/loader.py index 802520d..87617db 100644 --- a/modules/configloader/loader.py +++ b/modules/configloader/loader.py @@ -1,12 +1,12 @@ import json def readconfig(path): - #try: - with open(path) as cfg: - data = json.load(cfg) + try: + with open(path) as cfg: + data = json.load(cfg) - return data + return data - #except: - #print("[Error] Something went wrong reading the configuration file.") - #print("--", path) + except: + print("[Error] Something went wrong reading the configuration file.") + print("--", path)