From c94b518295c5d6c0aa224375b8e3d9a83ebed077 Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Thu, 5 Oct 2017 11:09:07 +0200 Subject: [PATCH] Removed Python 2.6 email.utils import fallback --- wagtail/utils/sendfile_streaming_backend.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/wagtail/utils/sendfile_streaming_backend.py b/wagtail/utils/sendfile_streaming_backend.py index 1aea895993..206d00d768 100644 --- a/wagtail/utils/sendfile_streaming_backend.py +++ b/wagtail/utils/sendfile_streaming_backend.py @@ -6,17 +6,12 @@ from __future__ import absolute_import, unicode_literals import os import re import stat +from email.utils import mktime_tz, parsedate_tz from wsgiref.util import FileWrapper from django.http import HttpResponseNotModified, StreamingHttpResponse from django.utils.http import http_date -try: - from email.utils import parsedate_tz, mktime_tz -except ImportError: - from email.Utils import parsedate_tz, mktime_tz - - def sendfile(request, filename, **kwargs): # Respect the If-Modified-Since header.