mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
[py3] Used six.reraise wherever necessary.
This commit is contained in:
parent
473d5f4ba1
commit
d796c94b03
8 changed files with 38 additions and 30 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue