Skip to content

Commit

Permalink
modified database ini file path
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgiolaga committed May 28, 2023
1 parent 128fdd7 commit 1463f09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1463f09

Please sign in to comment.