Patch for an Issue #510

This commit is contained in:
Miroslav Stampar 2013-08-20 18:54:32 +02:00
parent 6cc0cf3702
commit c586559e30

View File

@ -14,7 +14,9 @@ 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) _ = imp.load_module("sqlalchemy", f, pathname, desc)
if hasattr(_, "dialects"):
_sqlalchemy = _
warnings.simplefilter(action="ignore", category=_sqlalchemy.exc.SAWarning) warnings.simplefilter(action="ignore", category=_sqlalchemy.exc.SAWarning)
except ImportError: except ImportError:
pass pass