]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
dont do RAWTOHEX on None
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 15 Feb 2007 17:19:13 +0000 (17:19 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 15 Feb 2007 17:19:13 +0000 (17:19 +0000)
lib/sqlalchemy/databases/oracle.py

index 0717331622cd58c6bd7c904e7d0e78d5f8907dfa..e1c82450fd926b546f5f9c9c362c00b2b42e7977 100644 (file)
@@ -63,8 +63,11 @@ class OracleBinary(sqltypes.Binary):
     def get_col_spec(self):
         return "BLOB"
     def convert_bind_param(self, value, dialect):
-        # this is RAWTOHEX
-        return ''.join(["%.2X" % ord(c) for c in value])
+        if value is None:
+            return None
+        else:
+            # this is RAWTOHEX
+            return ''.join(["%.2X" % ord(c) for c in value])
     def convert_result_value(self, value, dialect):
         if value is None:
             return None