summaryrefslogtreecommitdiff
path: root/ausbutler/config.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-01-05 13:17:18 +0100
committeremkael <emkael@tlen.pl>2017-01-05 13:17:18 +0100
commit8a6b5981795fc65c994d8e42c78f23a6c8d10498 (patch)
treee20c52832c9369d6098cf2460d4c7c9a6a9b652d /ausbutler/config.py
parent830aaabd3e8105ad47460628587660cb496f507e (diff)
Refactoring - config loading helper
Diffstat (limited to 'ausbutler/config.py')
-rw-r--r--ausbutler/config.py8
1 files changed, 8 insertions, 0 deletions
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')))