mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-03 11:40:11 +03:00
Update downloads.py
This commit is contained in:
parent
ee93be9422
commit
f676005de5
|
@ -439,7 +439,8 @@ class DownloadMethods:
|
||||||
if inspect.isawaitable(r):
|
if inspect.isawaitable(r):
|
||||||
await r
|
await r
|
||||||
|
|
||||||
if hasattr(f, 'flush') and callable(getattr(f, 'flush')):
|
# Not all IO objects have flush (see #1227)
|
||||||
|
if callable(getattr(f, 'flush', None)):
|
||||||
f.flush()
|
f.flush()
|
||||||
|
|
||||||
if in_memory:
|
if in_memory:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user