diff options
author | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2008-10-18 00:12:13 +0000 |
---|---|---|
committer | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2008-10-18 00:12:13 +0000 |
commit | 570b96f9a751fde246e67509c8a7f730c17fd734 (patch) | |
tree | fd9277d28cd2155e241c12c36146f0b5e7cbf3e4 /MySQLdb | |
parent | 57c69aa57f84724eb7eb78481834a268c3040742 (diff) | |
download | mysqldb1-570b96f9a751fde246e67509c8a7f730c17fd734.tar.gz |
Found one more Set reference.
Change raise to use the modern syntax for Python 3.0 compatibility.
Diffstat (limited to 'MySQLdb')
-rw-r--r-- | MySQLdb/MySQLdb/connections.py | 6 | ||||
-rw-r--r-- | MySQLdb/MySQLdb/converters.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index 92733e7..92ca8ee 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -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() diff --git a/MySQLdb/MySQLdb/converters.py b/MySQLdb/MySQLdb/converters.py index cbd9841..fbc24a1 100644 --- a/MySQLdb/MySQLdb/converters.py +++ b/MySQLdb/MySQLdb/converters.py @@ -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, |