mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-08 05:31:32 +00:00
Disable sqlalchemy warnings if applicable
This commit is contained in:
@@ -8,11 +8,13 @@ See the file 'doc/COPYING' for copying permission
|
|||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
|
|
||||||
_sqlalchemy = None
|
_sqlalchemy = None
|
||||||
try:
|
try:
|
||||||
f, pathname, desc = imp.find_module("sqlalchemy", sys.path[1:])
|
f, pathname, desc = imp.find_module("sqlalchemy", sys.path[1:])
|
||||||
_sqlalchemy = imp.load_module("sqlalchemy", f, pathname, desc)
|
_sqlalchemy = imp.load_module("sqlalchemy", f, pathname, desc)
|
||||||
|
warnings.simplefilter(action="ignore", category=_sqlalchemy.exc.SAWarning)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user