[py3] Used six.reraise wherever necessary.

This commit is contained in:
Aymeric Augustin 2012-07-20 12:18:38 +02:00
parent 473d5f4ba1
commit d796c94b03
8 changed files with 38 additions and 30 deletions

View file

@ -14,6 +14,7 @@ from django.db.models.query_utils import (Q, select_related_descend,
from django.db.models.deletion import Collector
from django.db.models import sql
from django.utils.functional import partition
from django.utils import six
# Used to control how many objects are worked with at once in some cases (e.g.
# when deleting objects).
@ -470,7 +471,7 @@ class QuerySet(object):
return self.get(**lookup), False
except self.model.DoesNotExist:
# Re-raise the IntegrityError with its original traceback.
raise exc_info[1], None, exc_info[2]
six.reraise(exc_info[1], None, exc_info[2])
def latest(self, field_name=None):
"""