kopia lustrzana https://github.com/wagtail/wagtail
Replaced six.reraise with Python 3 syntax for re-raising
rodzic
8aa8ddcde9
commit
7a7b6748db
wagtail
|
@ -1,5 +1,4 @@
|
|||
import operator
|
||||
import sys
|
||||
from collections import OrderedDict
|
||||
from functools import reduce
|
||||
|
||||
|
@ -19,7 +18,6 @@ from django.db.models.fields.related import ForeignObjectRel, ManyToManyField
|
|||
from django.db.models.sql.constants import QUERY_TERMS
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
from django.template.defaultfilters import filesizeformat
|
||||
from django.utils import six
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.functional import cached_property
|
||||
|
@ -405,10 +403,7 @@ class IndexView(WMABaseView):
|
|||
filter_specs, bool(filter_specs), lookup_params, use_distinct
|
||||
)
|
||||
except FieldDoesNotExist as e:
|
||||
six.reraise(
|
||||
IncorrectLookupParameters,
|
||||
IncorrectLookupParameters(e),
|
||||
sys.exc_info()[2])
|
||||
raise IncorrectLookupParameters from e
|
||||
|
||||
def get_query_string(self, new_params=None, remove=None):
|
||||
if new_params is None:
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import sys
|
||||
from importlib import import_module
|
||||
|
||||
from django.utils.module_loading import import_string
|
||||
from django.utils import six
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
|
@ -21,7 +19,7 @@ def import_finder_class(dotted_path):
|
|||
try:
|
||||
return import_string(dotted_path)
|
||||
except ImportError:
|
||||
six.reraise(ImportError, e, sys.exc_info()[2])
|
||||
raise ImportError from e
|
||||
|
||||
|
||||
def _get_config_from_settings():
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
# Based on the Django cache framework
|
||||
# https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/core/cache/__init__.py
|
||||
|
||||
import sys
|
||||
from importlib import import_module
|
||||
|
||||
from django.utils import six
|
||||
from django.utils.module_loading import import_string
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.conf import settings
|
||||
|
@ -46,7 +44,7 @@ def import_backend(dotted_path):
|
|||
# Old
|
||||
return import_string(dotted_path)
|
||||
except ImportError:
|
||||
six.reraise(ImportError, e, sys.exc_info()[2])
|
||||
raise ImportError from e
|
||||
|
||||
|
||||
def get_search_backend(backend='default', **kwargs):
|
||||
|
|
Ładowanie…
Reference in New Issue