From bcbd5bb12b3a1f89948d21a7a9bc0f056db73f38 Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Tue, 2 Sep 2014 11:27:50 +0200 Subject: --status --- xboomx/config.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 xboomx/config.py (limited to 'xboomx/config.py') 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() -- cgit v1.2.3