mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +03:00
Check exist flush method
This commit is contained in:
parent
0ced884aa3
commit
ee93be9422
|
@ -439,7 +439,9 @@ class DownloadMethods:
|
|||
if inspect.isawaitable(r):
|
||||
await r
|
||||
|
||||
f.flush()
|
||||
if hasattr(f, 'flush') and callable(getattr(f, 'flush')):
|
||||
f.flush()
|
||||
|
||||
if in_memory:
|
||||
return f.getvalue()
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue
Block a user