aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorArun Isaac2022-09-01 15:53:59 +0530
committerArun Isaac2022-09-01 15:53:59 +0530
commit9f7e09ddb47afbc1ad2c11da5d70a6ce749b2c1d (patch)
tree5b8c41232578fb3bca5d10792cc7c4245cabb0cf /wqflask
parent327506abbc9b4a368f5785b8f90086cc5e038eb8 (diff)
downloadgenenetwork2-9f7e09ddb47afbc1ad2c11da5d70a6ce749b2c1d.tar.gz
Allow connecting to SQL database without a password.
* wqflask/wqflask/database.py (database_connection): Use empty string as password when there is none.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/database.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py
index 82a35013..3431e944 100644
--- a/wqflask/wqflask/database.py
+++ b/wqflask/wqflask/database.py
@@ -47,7 +47,7 @@ def database_connection():
"""
host, user, passwd, db_name, port = parse_db_url(sql_uri())
connection = MySQLdb.connect(
- db=db_name, user=user, passwd=passwd, host=host, port=port,
+ db=db_name, user=user, passwd=passwd or '', host=host, port=port,
autocommit=False # Required for roll-backs
)
try: