I was getting an error when I tried to use a parameter that was a unicode string. This patch fixes it. (and makes the numeric case a bit more robust. The same should be done for date/time.) Is there a better place to submit files?
RCS file: /cvsroot/pymssql/pymssql/pymssql.py,v retrieving revision 1.14 diff -r1.14 pymssql.py 203c203 < if type(x) == types.StringType: --- > if isinstance(x,basestring): 205c205 < elif type(x) in (types.IntType, types.LongType, types.FloatType): --- > elif isinstance(x, (int, long, float)):
Thanks, it's been commited to CVS.
Regards, Andrzej Kukula
Log in to post a comment.
I was getting an error when I tried to use a parameter that was a unicode string. This patch fixes it. (and makes the numeric case a bit more robust. The same should be done for date/time.) Is there a better place to submit files?
Index: pymssql.py
RCS file: /cvsroot/pymssql/pymssql/pymssql.py,v
retrieving revision 1.14
diff -r1.14 pymssql.py
203c203
< if type(x) == types.StringType:
---
> if isinstance(x,basestring):
205c205
< elif type(x) in (types.IntType, types.LongType, types.FloatType):
---
> elif isinstance(x, (int, long, float)):
Thanks, it's been commited to CVS.
Regards,
Andrzej Kukula