_mysql imports now, but still crashes

This commit is contained in:
adustman
2012-09-08 18:44:34 +00:00
parent a5c7996f60
commit fe917fcced
2 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,12 @@ These classes are dictated by the DB API v2.0:
http://www.python.org/topics/database/DatabaseAPI-2.0.html
"""
from exceptions import Exception, StandardError, Warning
try:
from exceptions import Exception, StandardError, Warning
except ImportError:
# Python 3
StandardError = Exception
class MySQLError(StandardError):
@ -80,4 +85,3 @@ class NotSupportedError(DatabaseError):
has transactions turned off."""
del Exception, StandardError