Found one more Set reference.

Change raise to use the modern syntax for Python 3.0 compatibility.
This commit is contained in:
adustman
2008-10-18 00:12:13 +00:00
parent 57c69aa57f
commit 570b96f9a7
2 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ def defaulterrorhandler(connection, cursor, errorclass, errorvalue):
connection.messages.append(error)
del cursor
del connection
raise errorclass, errorvalue
raise errorclass(errorvalue)
class Connection(_mysql.connection):
@@ -277,7 +277,7 @@ class Connection(_mysql.connection):
super(Connection, self).set_character_set(charset)
except AttributeError:
if self._server_version < (4, 1):
raise NotSupportedError, "server is too old to set charset"
raise NotSupportedError("server is too old to set charset")
self.query('SET NAMES %s' % charset)
self.store_result()
self.string_decoder.charset = charset
@@ -287,7 +287,7 @@ class Connection(_mysql.connection):
"""Set the connection sql_mode. See MySQL documentation for
legal values."""
if self._server_version < (4, 1):
raise NotSupportedError, "server is too old to set sql_mode"
raise NotSupportedError("server is too old to set sql_mode")
self.query("SET SESSION sql_mode='%s'" % sql_mode)
self.store_result()

View File

@@ -130,7 +130,7 @@ conversions = {
types.BooleanType: Bool2Str,
DateTimeType: DateTime2literal,
DateTimeDeltaType: DateTimeDelta2literal,
Set: Set2Str,
set: Set2Str,
FIELD_TYPE.TINY: int,
FIELD_TYPE.SHORT: int,
FIELD_TYPE.LONG: long,