diff options
Diffstat (limited to 'xboomx/config.py')
-rw-r--r-- | xboomx/config.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xboomx/config.py b/xboomx/config.py new file mode 100644 index 0000000..a98ef03 --- /dev/null +++ b/xboomx/config.py @@ -0,0 +1,15 @@ +import os +import json +import logging + + +def load_config(): + try: + with open(os.getenv("HOME") + "/.xboomx/config") as config_file: + return json.loads('\n'.join(config_file.readlines())) + except: + logging.error("Failed to load config file") + return {} + + +config = load_config() |