mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 19:20:09 +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):
|
if inspect.isawaitable(r):
|
||||||
await r
|
await r
|
||||||
|
|
||||||
f.flush()
|
if hasattr(f, 'flush') and callable(getattr(f, 'flush')):
|
||||||
|
f.flush()
|
||||||
|
|
||||||
if in_memory:
|
if in_memory:
|
||||||
return f.getvalue()
|
return f.getvalue()
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user