From bece5d4b3b65ef5c1a8276bae6095ae2731a75fc Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sun, 5 Feb 2023 09:58:00 -0700 Subject: [PATCH] logging_handler.py: Avoid file size check if missing --- resources/logging_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/logging_handler.py b/resources/logging_handler.py index 54b3ee182..bf7c055ee 100644 --- a/resources/logging_handler.py +++ b/resources/logging_handler.py @@ -41,6 +41,9 @@ class InitializeLoggingSupport: We check if we're near the max file size, and if so, we clean the log file """ + if not self.log_filepath.exists(): + return + if self.log_filepath.stat().st_size < self.file_size_redline: return