From 707edc7b1a017b446e5262ce118f22015a72cc13 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 10 May 2011 13:28:07 +0000 Subject: [PATCH] fix for a bug (previously --dbms="mysql 4" was ignored and abruptly terminated while the mechanism was here all along) --- lib/core/option.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 9119a7dde..c16ae370a 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -667,11 +667,11 @@ def __setDBMS(): logger.debug(debugMsg) conf.dbms = conf.dbms.lower() - firstRegExp = "(%s)" % "|".join([alias for alias in SUPPORTED_DBMS]) - dbmsRegExp = re.search("%s ([\d\.]+)" % firstRegExp, conf.dbms, re.I) - if dbmsRegExp: - Backend.setVersion(str(dbmsRegExp.group(2))) + regex = re.search("%s ([\d\.]+)" % ("(%s)" % "|".join([alias for alias in SUPPORTED_DBMS])), conf.dbms, re.I) + if regex: + conf.dbms = regex.group(1) + Backend.setVersion(regex.group(2)) if conf.dbms not in SUPPORTED_DBMS: errMsg = "you provided an unsupported back-end database management "