fix log filenotfound exception

This commit is contained in:
Diogo Sousa
2023-01-29 17:57:44 +00:00
parent 5befc2f9f7
commit 5a591e2e13

View File

@@ -130,7 +130,8 @@ class LogSender(Thread):
def max_size_exceeded(self, file: Path) -> bool:
"""Check if the log file is bigger than 2MB."""
if not file.exists():
return False
return file.stat().st_size > 2 * 1024 * 1024
def send_path(self, path: Path, last: bool = False):