From a479e6fb60aef89ea5bd7bb88276ca2d25329e12 Mon Sep 17 00:00:00 2001 From: adustman Date: Sun, 11 Feb 2007 15:49:53 +0000 Subject: [PATCH] Suggestion from #1655760. --- MySQLdb/MySQLdb/cursors.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MySQLdb/MySQLdb/cursors.py b/MySQLdb/MySQLdb/cursors.py index 99489ac..bc0cc48 100644 --- a/MySQLdb/MySQLdb/cursors.py +++ b/MySQLdb/MySQLdb/cursors.py @@ -200,9 +200,8 @@ class BaseCursor(object): 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"):