From 9625c991c6acfce3abda197e49e0532f3734f390 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sat, 27 Feb 2021 10:41:47 +0100 Subject: [PATCH] No need to close, the context manager does it --- LogBot/logbot.py | 1 - 1 file changed, 1 deletion(-) diff --git a/LogBot/logbot.py b/LogBot/logbot.py index c6d01a9..da6ac92 100644 --- a/LogBot/logbot.py +++ b/LogBot/logbot.py @@ -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)