From c86b9790ca93db21a4e21e8d37046a8f45bae577 Mon Sep 17 00:00:00 2001 From: A_D Date: Tue, 17 Aug 2021 19:41:28 +0200 Subject: [PATCH] updated eddb to new killswitches --- plugins/eddb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/eddb.py b/plugins/eddb.py index 80fd9431..220046f0 100644 --- a/plugins/eddb.py +++ b/plugins/eddb.py @@ -94,14 +94,14 @@ def prefs_changed(cmdr, is_beta): def journal_entry(cmdr, is_beta, system, station, entry, state): - if (ks := killswitch.get_disabled('plugins.eddb.journal')).disabled: - logger.warning(f'Journal processing for EDDB has been disabled: {ks.reason}') + should_return, new_entry = killswitch.check_killswitch('plugins.eddb.journal', entry) + if should_return: # LANG: Journal Processing disabled due to an active killswitch plug.show_error(_('EDDB Journal processing disabled. See Log.')) return - elif (ks := killswitch.get_disabled(f'plugins.eddb.journal.event.{entry["event"]}')).disabled: - logger.warning(f'Processing of event {entry["event"]} has been disabled: {ks.reason}') + should_return, new_entry = killswitch.check_killswitch(f'plugins.eddb.journal.event.{entry["event"]}', new_entry) + if should_return: return this.on_foot = state['OnFoot']