Skip to content

Commit

Permalink
fixed the github actions not working due to the bad reader that is co…
Browse files Browse the repository at this point in the history
…nfig parser and their lack of support for inline comments that was messing up the db url
  • Loading branch information
kvnyng committed Feb 19, 2022
1 parent e23ddf2 commit 18d3ea1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions config.default.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[PostgreSQL]
name = absent; database name
user = absent; database user
password = password; database password
# database name
name = absent
# database user
user = absent
# database password
password = password
2 changes: 1 addition & 1 deletion src/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
cfg = ConfigParser()
cfg.read("config.default.ini")

SQLALCHEMY_DATABASE_URL = f"postgresql+psycopg2://{cfg['PostgreSQL']['user']}:{cfg['PostgreSQL']['password']}@localhost:5432/{cfg['PostgreSQL']['name']}"
SQLALCHEMY_DATABASE_URL = f"postgresql+psycopg2://{cfg['PostgreSQL']['user']}:{cfg['PostgreSQL']['password']}@127.0.0.1:5432/{cfg['PostgreSQL']['name']}"
print(SQLALCHEMY_DATABASE_URL)
engine = create_engine(
SQLALCHEMY_DATABASE_URL
Expand Down

0 comments on commit 18d3ea1

Please sign in to comment.