summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mssql/information_schema.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 20:38:53 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 20:38:53 -0400
commitc926f0a9d8910c67554f053ed0f7902542679f0d (patch)
tree85db2c4de6f43e4eee491b58b60e233b6b20a16e /lib/sqlalchemy/dialects/mssql/information_schema.py
parent2709ae46884f405d95dc16be0667a6cbbebcfb69 (diff)
downloadsqlalchemy-c926f0a9d8910c67554f053ed0f7902542679f0d.tar.gz
plugging away
Diffstat (limited to 'lib/sqlalchemy/dialects/mssql/information_schema.py')
-rw-r--r--lib/sqlalchemy/dialects/mssql/information_schema.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/information_schema.py b/lib/sqlalchemy/dialects/mssql/information_schema.py
index 61403271f..a7628f213 100644
--- a/lib/sqlalchemy/dialects/mssql/information_schema.py
+++ b/lib/sqlalchemy/dialects/mssql/information_schema.py
@@ -9,6 +9,7 @@
from ... import Table, MetaData, Column
from ...types import String, Unicode, Integer, TypeDecorator
from ... import cast
+from ... import util
ischema = MetaData()
@@ -17,10 +18,8 @@ class CoerceUnicode(TypeDecorator):
impl = Unicode
def process_bind_param(self, value, dialect):
-# start Py2K
-# if isinstance(value, str):
-# value = value.decode(dialect.encoding)
-# end Py2K
+ if util.py2k and isinstance(value, util.binary_type):
+ value = value.decode(dialect.encoding)
return value
def bind_expression(self, bindvalue):