Skip to content

Commit

Permalink
fix: config path
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Jan 21, 2019
1 parent 48cc10e commit fdb4f40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
import yaml
import logging

Expand All @@ -22,7 +23,8 @@ def loadConfig():
if env:
configFileName = 'config.{}.yml'.format(env)
logger.debug('load config {}'.format(configFileName))
with open(configFileName, 'r') as f:
configPath = os.path.join(sys.path[0], configFileName)
with open(configPath, 'r') as f:
config = yaml.load(f)
return config

Expand Down

0 comments on commit fdb4f40

Please sign in to comment.