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.
This commit is contained in:
farcepest
2012-09-26 16:02:05 -04:00
parent 129f09ace4
commit d1b43681cf
2 changed files with 3 additions and 3 deletions

View File

@ -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