aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/db.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/db.py b/python/db.py
index f78a1efd..518a1539 100644
--- a/python/db.py
+++ b/python/db.py
@@ -48,7 +48,8 @@ def dbengine(dbname):
else:
uri = URL(drivername="postgresql",
host=os.environ.get("PGHOST", "debian"),
- username=dbname[:-2] + '_user')
+ username=dbname[:-2] + '_user',
+ database=dbname)
return create_engine(uri, paramstyle="format")
def with_connection(dbname):