mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 02:54:29 +08:00
Improved support for Python 3.
This commit is contained in:
@ -188,7 +188,7 @@ class BaseCursor(object):
|
||||
try:
|
||||
r = None
|
||||
r = self._query(query)
|
||||
except TypeError, m:
|
||||
except TypeError as m:
|
||||
if m.args[0] in ("not enough arguments for format string",
|
||||
"not all arguments converted"):
|
||||
self.messages.append((ProgrammingError, m.args[0]))
|
||||
@ -247,7 +247,7 @@ class BaseCursor(object):
|
||||
for key, item in a.iteritems()))
|
||||
else:
|
||||
q.append(qv % tuple([db.literal(item) for item in a]))
|
||||
except TypeError, msg:
|
||||
except TypeError as 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