Changed MySQL backend so that it fails silently if rollback() isn't supported (the code catches NotSupportedError exception)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-08-10 04:45:10 +00:00
parent 0660203afe
commit 024e68e260
1 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ from django.core.db.dicthelpers import *
import MySQLdb as Database
from MySQLdb.converters import conversions
from MySQLdb.constants import FIELD_TYPE
from _mysql_exceptions import NotSupportedError
import types
DatabaseError = Database.DatabaseError
@ -40,7 +41,10 @@ class DatabaseWrapper:
def rollback(self):
if self.connection:
self.connection.rollback()
try:
self.connection.rollback()
except NotSupportedError:
pass
def close(self):
if self.connection is not None: