summaryrefslogtreecommitdiff
path: root/MySQLdb
diff options
context:
space:
mode:
authorfarcepest <farcepest@gmail.com>2012-09-26 16:02:05 -0400
committerAndy Dustman <farcepest@gmail.com>2012-09-27 12:40:03 -0400
commit048b70d90157d9526b89013b51b80afd70883292 (patch)
tree3b26d77ce5ca3564ccd4aae311330890e550e43d /MySQLdb
parent162e9e4d84a4b6f2c8320347f2390a9e18af1b29 (diff)
downloadmysqldb1-048b70d90157d9526b89013b51b80afd70883292.tar.gz
Fix MySQLdb1-1 Exception format incompatible with previous versions
Unfortunately, when I broke this, I broke the test at the same time. That should have been a red flag.
Diffstat (limited to 'MySQLdb')
-rw-r--r--MySQLdb/MySQLdb/connections.py2
-rw-r--r--MySQLdb/tests/test_MySQLdb_capabilities.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py
index d281cbd..1d6fa82 100644
--- a/MySQLdb/MySQLdb/connections.py
+++ b/MySQLdb/MySQLdb/connections.py
@@ -33,7 +33,7 @@ def defaulterrorhandler(connection, cursor, errorclass, errorvalue):
connection.messages.append(error)
del cursor
del connection
- raise errorclass(errorvalue)
+ raise errorclass, errorvalue
re_numeric_part = re.compile(r"^(\d+)")
diff --git a/MySQLdb/tests/test_MySQLdb_capabilities.py b/MySQLdb/tests/test_MySQLdb_capabilities.py
index 98a2371..a510468 100644
--- a/MySQLdb/tests/test_MySQLdb_capabilities.py
+++ b/MySQLdb/tests/test_MySQLdb_capabilities.py
@@ -77,8 +77,8 @@ class test_MySQLdb(capabilities.DatabaseTest):
from MySQLdb.constants import ER
try:
self.cursor.execute("describe some_non_existent_table");
- except self.connection.ProgrammingError as msg:
- self.assertTrue(msg.args[0].args[0] == ER.NO_SUCH_TABLE)
+ except self.connection.ProgrammingError, msg:
+ self.assertTrue(msg[0] == ER.NO_SUCH_TABLE)
def test_bug_3514287(self):
c = self.cursor