From 86f87cf4ace6cd41a192a53ca4b4c47851f30c78 Mon Sep 17 00:00:00 2001 From: Maks Skorokhod Date: Mon, 9 Oct 2017 17:55:35 +0300 Subject: [PATCH] :wrench: no use f'string' --- sanic/response.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sanic/response.py b/sanic/response.py index c05be0fd..582e11cf 100644 --- a/sanic/response.py +++ b/sanic/response.py @@ -305,7 +305,8 @@ async def file( headers = headers or {} if filename: headers.setdefault( - 'Content-Disposition', f'attachment; filename="{filename}"') + 'Content-Disposition', + 'attachment; filename="{}"'.format(filename)) filename = filename or path.split(location)[-1] async with open_async(location, mode='rb') as _file: @@ -339,7 +340,8 @@ async def file_stream( headers = headers or {} if filename: headers.setdefault( - 'Content-Disposition', f'attachment; filename="{filename}"') + 'Content-Disposition', + 'attachment; filename="{}"'.format(filename)) filename = filename or path.split(location)[-1] _file = await open_async(location, mode='rb')