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