aboutsummaryrefslogtreecommitdiff
path: root/xboomx/config.py
blob: a98ef039ef1ef8301ae082844e6eadca78043bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()