Minor update

This commit is contained in:
stamparm 2013-04-15 16:07:27 +02:00
parent 140cffbde2
commit a3d36fcb73

View File

@ -10,6 +10,7 @@ from lib.core.data import conf
from lib.core.data import logger
from lib.core.dicts import DBMS_DICT
from lib.core.enums import DBMS
from lib.core.exception import SqlmapConnectionException
from lib.core.settings import MSSQL_ALIASES
from lib.core.settings import MYSQL_ALIASES
from lib.core.settings import ORACLE_ALIASES
@ -82,7 +83,11 @@ def setHandler():
dialect = DBMS_DICT[name][3]
sqlalchemy = SQLAlchemy(dialect=dialect)
try:
sqlalchemy.connect()
except SqlmapConnectionException, msg:
logger.critical(msg)
if sqlalchemy.connection:
conf.dbmsConnector = sqlalchemy