diff --git a/db/config.py b/db/config.py index 974afbc..47f060c 100644 --- a/db/config.py +++ b/db/config.py @@ -3,7 +3,8 @@ def config(filename='database.ini', section='postgresql'): parser = ConfigParser() - parser.read(filename) + conf_file = os.path.join(os.path.dirname(os.path.dirname(__file__)), filename) + parser.read(conf_file) db = {} if not parser.has_section(section): raise Exception('Section {0} not found in the {1} file'.format(section, filename))