Commit c3c3fbaa authored by Alejandro Alvarez Ayllon's avatar Alejandro Alvarez Ayllon
Browse files

Fix import for cursors

parent 6ac7f43e
Pipeline #68523 passed with stage
in 3 minutes
......@@ -76,7 +76,7 @@ def load_environment(global_conf, app_conf):
# Setup the SQLAlchemy database engine
kwargs = dict()
if config['sqlalchemy.url'].startswith('mysql://'):
import MySQLdb
import MySQLdb.cursors
kwargs['connect_args'] = {'cursorclass': MySQLdb.cursors.SSCursor}
engine = engine_from_config(config, 'sqlalchemy.', pool_recycle=7200, **kwargs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment