From e3254aec3104d831af0996aa28f0b54ad7835dc2 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 3 Jan 2023 15:34:11 +0000 Subject: [PATCH] monitor: Minor cleanup on 'Location'->'Docked' handling * All my recent Location events *have* the 'Docked' flag. * If any don't, then just use a default on .get() to set it False. --- monitor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monitor.py b/monitor.py index bab1d244..541cd03b 100644 --- a/monitor.py +++ b/monitor.py @@ -863,8 +863,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below if event_type == 'location': logger.trace_if('journal.locations', '"Location" event') - if entry.get('Docked'): - self.state['IsDocked'] = True + self.state['IsDocked'] = entry.get('Docked', False) elif event_type == 'fsdjump': self.state['Body'] = None