mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +03:00
Update downloads.py
This commit is contained in:
parent
ee93be9422
commit
f676005de5
|
@ -439,7 +439,8 @@ class DownloadMethods:
|
|||
if inspect.isawaitable(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()
|
||||
|
||||
if in_memory:
|
||||
|
|
Loading…
Reference in New Issue
Block a user