From 93bf8e2a139d530e1a3af505fa3b9ceb08c0277a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 10 May 2014 01:11:19 +0200 Subject: [PATCH] Bug fix --- lib/utils/sqlalchemy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/sqlalchemy.py b/lib/utils/sqlalchemy.py index d35fcd1f1..104d75d4e 100644 --- a/lib/utils/sqlalchemy.py +++ b/lib/utils/sqlalchemy.py @@ -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()