mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 11:10:58 +08:00
Suggestion from #1655760.
This commit is contained in:
@ -200,9 +200,8 @@ class BaseCursor(object):
|
|||||||
p = m.start(1)
|
p = m.start(1)
|
||||||
e = m.end(1)
|
e = m.end(1)
|
||||||
qv = m.group(1)
|
qv = m.group(1)
|
||||||
qargs = db.literal(args)
|
|
||||||
try:
|
try:
|
||||||
q = [ qv % a for a in qargs ]
|
q = [ qv % db.literal(a) for a in args ]
|
||||||
except TypeError, msg:
|
except TypeError, msg:
|
||||||
if msg.args[0] in ("not enough arguments for format string",
|
if msg.args[0] in ("not enough arguments for format string",
|
||||||
"not all arguments converted"):
|
"not all arguments converted"):
|
||||||
|
Reference in New Issue
Block a user