aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/db.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/db.py b/python/db.py
index f04cfdc4..81f1cc4e 100644
--- a/python/db.py
+++ b/python/db.py
@@ -50,6 +50,7 @@ def dbengine(dbname, cursor_factory=DictCursor):
uri = URL(drivername="mysql+mysqlconnector",
host="debian", database=dbname,
query={'option_files': os.path.expanduser('~/.my.cnf')})
+ return create_engine(uri, paramstyle="format")
else:
if dbname == 'etdb':
dbname= 'ET'
@@ -61,8 +62,8 @@ def dbengine(dbname, cursor_factory=DictCursor):
username=user_name,
database=dbname,
query={"options": "-c extra_float_digits=3"})
- return create_engine(uri, paramstyle="format",
- connect_args={'cursor_factory': cursor_factory})
+ return create_engine(uri, paramstyle="format",
+ connect_args={'cursor_factory': cursor_factory})
def with_connection(dbname):
def decorator(f):