From be2e0df0ddfc174e99cf47a5180ffc1e3661b289 Mon Sep 17 00:00:00 2001 From: J08nY Date: Tue, 22 Aug 2017 13:52:57 +0200 Subject: qa. --- src/django_pgpmailman/views/list.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/django_pgpmailman/views/list.py') diff --git a/src/django_pgpmailman/views/list.py b/src/django_pgpmailman/views/list.py index f2289b2..4f6d8db 100644 --- a/src/django_pgpmailman/views/list.py +++ b/src/django_pgpmailman/views/list.py @@ -111,9 +111,10 @@ class ListKey(View): raise Http404 key_file = ContentFile(str(key)) response = HttpResponse(key_file, 'application/pgp-keys') - response['Content-Length'] = key_file.size - response[ - 'Content-Disposition'] = 'attachment; filename="%s.asc"' % self.pgp_list.list_id + length = key_file.size + disposition = 'attachment; filename="%s.asc"' % self.pgp_list.list_id + response['Content-Length'] = length + response['Content-Disposition'] = disposition return response -- cgit v1.2.3-70-g09d2