This commit is contained in:
Miroslav Stampar 2014-05-10 01:11:19 +02:00
parent 8f0807d7f9
commit 93bf8e2a13

View File

@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
import imp
import logging
import os
import re
import sys
import warnings
@ -51,7 +52,7 @@ class SQLAlchemy(GenericConnector):
conf.direct = "%s////%s" % (_[0], os.path.abspath(self.db))
if self.dialect:
conf.direct = conf.direct.replace(conf.dbms, self.dialect)
conf.direct = conf.direct.replace(conf.dbms, self.dialect, 1)
engine = _sqlalchemy.create_engine(conf.direct, connect_args={'check_same_thread':False} if self.dialect == "sqlite" else {})
self.connector = engine.connect()