🔧 no use f'string'

This commit is contained in:
Maks Skorokhod 2017-10-09 17:55:35 +03:00
parent c4e3a98ea7
commit 86f87cf4ac
No known key found for this signature in database
GPG Key ID: 23233B8320707983

View File

@ -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')