Fixed a regression in the Postgres psycopg cursor handling introduced by r12352. Thanks to Kenneth Gonsalves for the report, and Karen for the fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-02-03 07:31:00 +00:00
parent 8e5c116971
commit b740534dc4
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ class UnicodeCursorWrapper(object):
def execute(self, sql, params=()): def execute(self, sql, params=()):
try: try:
return self.cursor.execute(sql, params) return self.cursor.execute(smart_str(sql, self.charset), self.format_params(params))
except Database.IntegrityError, e: except Database.IntegrityError, e:
raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2] raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
except Database.DatabaseError, e: except Database.DatabaseError, e: