diff MySQLdb/cursors.py @ 8:fa8974a41c76 MySQLdb

New error handling code, plus some small fixes from 1.2
author adustman
date Sun, 11 Feb 2007 21:36:29 +0000
parents b70cce9bd065
children 3f4c6af70e52
line wrap: on
line diff
--- a/MySQLdb/cursors.py	Sun Feb 11 07:40:50 2007 +0000
+++ b/MySQLdb/cursors.py	Sun Feb 11 21:36:29 2007 +0000
@@ -200,9 +200,8 @@
         p = m.start(1)
         e = m.end(1)
         qv = m.group(1)
-        qargs = db.literal(args)
         try:
-            q = [ qv % a for a in qargs ]
+            q = [ qv % db.literal(a) for a in args ]
         except TypeError, msg:
             if msg.args[0] in ("not enough arguments for format string",
                                "not all arguments converted"):