replaced list comp with filter

This commit is contained in:
A_D committed 2020-07-31 15:47:25 +02:00
1 parent a699ab062d
commit bb1def48cd
1 file changed
+2 -2
+2 -2
View File
@@ -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