0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Removed Python 2.6 email.utils import fallback

This commit is contained in:
Mads Jensen 2017-10-05 11:09:07 +02:00 committed by Matt Westcott
parent 27eddba955
commit c94b518295

View File

@ -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.