mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
Revert raise exc as value statements to raise exc, value since it breaks Python < 2.6.
This commit is contained in:
@@ -166,7 +166,7 @@ class BaseCursor(object):
|
||||
try:
|
||||
r = None
|
||||
r = self._query(query)
|
||||
except TypeError as m:
|
||||
except TypeError, m:
|
||||
if m.args[0] in ("not enough arguments for format string",
|
||||
"not all arguments converted"):
|
||||
self.messages.append((ProgrammingError, m.args[0]))
|
||||
@@ -217,7 +217,7 @@ class BaseCursor(object):
|
||||
qv = m.group(1)
|
||||
try:
|
||||
q = [ qv % db.literal(a) for a in args ]
|
||||
except TypeError as msg:
|
||||
except TypeError, msg:
|
||||
if msg.args[0] in ("not enough arguments for format string",
|
||||
"not all arguments converted"):
|
||||
self.errorhandler(self, ProgrammingError, msg.args[0])
|
||||
|
||||
Reference in New Issue
Block a user