From 8a6b5981795fc65c994d8e42c78f23a6c8d10498 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 5 Jan 2017 13:17:18 +0100 Subject: Refactoring - config loading helper --- ausbutler/config.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 ausbutler/config.py (limited to 'ausbutler/config.py') diff --git a/ausbutler/config.py b/ausbutler/config.py new file mode 100644 index 0000000..7a0f57d --- /dev/null +++ b/ausbutler/config.py @@ -0,0 +1,8 @@ +from os import path +import json +import __main__ + +def load_config(filename): + return json.load( + open(path.join(path.dirname(__main__.__file__), + 'config', filename + '.json'))) -- cgit v1.2.3