From 5db016cfb37f3a772a25f776cbc0216bddffef6d Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 8 Oct 2022 23:59:59 +0200 Subject: [PATCH] Chore: Fix `ResourceWarning: unclosed file <_io.TextIOWrapper name=...` --- apprise/logger.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apprise/logger.py b/apprise/logger.py index 4510e1b6..fefa08bd 100644 --- a/apprise/logger.py +++ b/apprise/logger.py @@ -181,6 +181,7 @@ class LogCapture: if self.__path: # Close our file pointer self.__buffer_ptr.close() + self.__handler.close() if self.__delete: try: # Always remove file afterwards