monitor: Bail from get_entry() if self.thread is None

If there's no thread to have sent the message then we shouldn't care
about it as this means we're in shutdown.
This commit is contained in:
Athanasius committed 2021-01-08 14:56:22 +00:00
1 parent 95b87f5b7b
commit 8a0a82fe43
1 file changed
+4
+4
View File
@@ -828,6 +828,10 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
:return: dict representing the event
"""
if self.thread is None:
logger.debug('Called whilst self.thread is None, returning')
return None
if not self.event_queue:
logger.debug('Called with no event_queue')
return None