From ec1282887765b5d3f0c48f08e18d33d6aa1f8c0e Mon Sep 17 00:00:00 2001 From: Brian Helba Date: Mon, 25 Oct 2021 09:52:21 -0400 Subject: [PATCH] Simplify import of django.core.wsgi.get_wsgi_application This has been available since Django 1.4. The import guard is no longer necessary. --- configurations/wsgi.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/configurations/wsgi.py b/configurations/wsgi.py index 54ab753..ea157a3 100644 --- a/configurations/wsgi.py +++ b/configurations/wsgi.py @@ -2,13 +2,7 @@ from . import importer importer.install() -try: - from django.core.wsgi import get_wsgi_application -except ImportError: # pragma: no cover - from django.core.handlers.wsgi import WSGIHandler - - def get_wsgi_application(): # noqa - return WSGIHandler() +from django.core.wsgi import get_wsgi_application # noqa: E402 # this is just for the crazy ones application = get_wsgi_application()