Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 707edc7

Browse files
committed
fix for a bug (previously --dbms="mysql 4" was ignored and abruptly terminated while the mechanism was here all along)
1 parent 1dea609 commit 707edc7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/core/option.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,11 @@ def __setDBMS():
667667
logger.debug(debugMsg)
668668

669669
conf.dbms = conf.dbms.lower()
670-
firstRegExp = "(%s)" % "|".join([alias for alias in SUPPORTED_DBMS])
671-
dbmsRegExp = re.search("%s ([\d\.]+)" % firstRegExp, conf.dbms, re.I)
672670

673-
if dbmsRegExp:
674-
Backend.setVersion(str(dbmsRegExp.group(2)))
671+
regex = re.search("%s ([\d\.]+)" % ("(%s)" % "|".join([alias for alias in SUPPORTED_DBMS])), conf.dbms, re.I)
672+
if regex:
673+
conf.dbms = regex.group(1)
674+
Backend.setVersion(regex.group(2))
675675

676676
if conf.dbms not in SUPPORTED_DBMS:
677677
errMsg = "you provided an unsupported back-end database management "

0 commit comments

Comments
 (0)