From 4b12a6c48469c1120a484a20a279d2291752dd32 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 18 Mar 2022 09:46:35 +0000 Subject: [PATCH] monitor: Properly type new_journal_file Python was guessing and not allowing 'None', which it will be at shutdown if this code triggers. --- monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor.py b/monitor.py index 2eee38e2..4451a5b4 100644 --- a/monitor.py +++ b/monitor.py @@ -430,7 +430,8 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below # Check whether new log file started, e.g. client (re)started. if emitter and emitter.is_alive(): - new_journal_file = self.logfile # updated by on_created watchdog callback + new_journal_file: Optional[str] = self.logfile # updated by on_created watchdog callback + else: # Poll try: