summaryrefslogtreecommitdiff
path: root/web-server/opendc/util/database.py
diff options
context:
space:
mode:
Diffstat (limited to 'web-server/opendc/util/database.py')
-rw-r--r--web-server/opendc/util/database.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/web-server/opendc/util/database.py b/web-server/opendc/util/database.py
index 50bc93a8..09d241b5 100644
--- a/web-server/opendc/util/database.py
+++ b/web-server/opendc/util/database.py
@@ -10,10 +10,13 @@ CONNECTION_POOL = None
class Database:
+ """Object holding functionality for database access."""
def __init__(self):
self.opendc_db = None
def init_database(self, user, password, database, host):
+ """Initializes the database connection."""
+
user = urllib.parse.quote_plus(user) # TODO: replace this with environment variable
password = urllib.parse.quote_plus(password) # TODO: same as above
database = urllib.parse.quote_plus(database)