summaryrefslogtreecommitdiff
path: root/ausbutler/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'ausbutler/config.py')
-rw-r--r--ausbutler/config.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ausbutler/config.py b/ausbutler/config.py
index fc676e9..ef9efd7 100644
--- a/ausbutler/config.py
+++ b/ausbutler/config.py
@@ -5,6 +5,9 @@ import __main__
def load_config(filename):
- return json.load(
- open(path.join(path.dirname(__main__.__file__),
- 'config', filename + '.json')))
+ possible_directories = ['.', path.dirname(__main__.__file__)]
+ for directory in possible_directories:
+ if path.exists(path.join(directory, 'config')):
+ return json.load(
+ open(path.join(directory, 'config',
+ filename + '.json')))