No need to close, the context manager does it

This commit is contained in:
Luke Murphy 2021-02-27 10:41:47 +01:00
parent 3054fbf368
commit 9625c991c6
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -86,7 +86,6 @@ def download(self, message):
file_path = os.path.join(path, filename)
with open(file_path, "wb") as media_file:
media_file.write(data)
media_file.close()
# define media_post
media_path = os.path.join(media_type, filename)