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

Skip to content

Commit bc4e1da

Browse files
committed
Getting rid of those ugly warning messages
1 parent ba4ed30 commit bc4e1da

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/utils/sqlalchemy.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
except ImportError:
1919
pass
2020

21+
try:
22+
import MySQLdb # used by SQLAlchemy in case of MySQL
23+
warnings.filterwarnings("error", category=MySQLdb.Warning)
24+
except ImportError:
25+
pass
26+
2127
from lib.core.data import conf
2228
from lib.core.data import logger
2329
from lib.core.exception import SqlmapConnectionException

0 commit comments

Comments
 (0)