Use cursor query to display wrong SQL

This commit is contained in:
Cédric Krier committed 2009-02-04 15:34:03 +01:00
1 parent f63aaa316d
commit be55d5f76a
1 file changed
+1 -2
+1 -2
View File
@@ -203,8 +203,7 @@ class Cursor(CursorInterface):
res = self.cursor.execute(sql)
except:
logger = logging.getLogger('sql')
logger.error('Wrong SQL: ' + sql % tuple("'%s'" % unicode(x)
for x in params or []))
logger.error('Wrong SQL: ' + self.cursor.query)
raise
if self.sql_log:
res_from = RE_FROM.match(sql.lower())