]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
no Binary here if we are running a test with no DBAPI
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 31 Jan 2014 22:29:19 +0000 (17:29 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 31 Jan 2014 22:29:19 +0000 (17:29 -0500)
lib/sqlalchemy/types.py

index a9e015153c9256389b1870eab0467453ab1ca1f4..0107530d62f29b3ba2d996c0a6f19f0f90a6d0be 100644 (file)
@@ -1746,6 +1746,8 @@ class _Binary(TypeEngine):
     # Python 3 - sqlite3 doesn't need the `Binary` conversion
     # here, though pg8000 does to indicate "bytea"
     def bind_processor(self, dialect):
+        if dialect.dbapi is None:
+            return None
         DBAPIBinary = dialect.dbapi.Binary
 
         def process(value):