No need to close, the context manager does it
This commit is contained in:
parent
3054fbf368
commit
9625c991c6
@ -86,7 +86,6 @@ def download(self, message):
|
|||||||
file_path = os.path.join(path, filename)
|
file_path = os.path.join(path, filename)
|
||||||
with open(file_path, "wb") as media_file:
|
with open(file_path, "wb") as media_file:
|
||||||
media_file.write(data)
|
media_file.write(data)
|
||||||
media_file.close()
|
|
||||||
|
|
||||||
# define media_post
|
# define media_post
|
||||||
media_path = os.path.join(media_type, filename)
|
media_path = os.path.join(media_type, filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user