From bb1def48cd44666f06cf701613e41b4123ec651b Mon Sep 17 00:00:00 2001 From: A_D Date: Wed, 29 Jul 2020 17:16:38 +0200 Subject: [PATCH] replaced list comp with filter --- plugins/inara.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inara.py b/plugins/inara.py index 626c7ca4..6ec9bbc0 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -726,8 +726,8 @@ def journal_entry(cmdr: str, is_beta: bool, system: str, station: str, entry: Di if this.storedmodules != modules: # Only send on change this.storedmodules = modules - this.events = [x for x in this.events if x['eventName'] - != 'setCommanderStorageModules'] # Remove any unsent + # Remove any unsent + this.events = list(filter(lambda e: e['eventName'] != 'setCommanderStorageModules', this.events)) add_event('setCommanderStorageModules', entry['timestamp'], this.storedmodules) # Missions