Added NASA APOD. Added Config Module

This commit is contained in:
Robert 2020-01-08 02:08:07 +01:00
parent 06cd25eb96
commit d2622e25e8
6 changed files with 83 additions and 15 deletions

18
util/config.py Normal file
View file

@ -0,0 +1,18 @@
import json
from util import logging
filepath = ""
settings = {}
def load(file):
global settings
filepath = file
try:
with open(file, "r") as sett_file:
settings = json.load(sett_file)
logging.info(f"Trying {filepath}.....Success!")
return True
except Exception as e:
logging.info(f"Trying {filepath}.....Failed!")
logging.error(str(e))
return False