From e86110a3da0455e244ba07fe2fa3c40647a4c0f3 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 30 Nov 2022 12:07:48 +0000 Subject: [PATCH] inara: Only warn for 'Legacy' if data would have been sent * Specifically, only warn if the user option to send to Inara is active. --- plugins/inara.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/inara.py b/plugins/inara.py index 1a7cf1f6..598c4c04 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -376,8 +376,11 @@ def journal_entry( # noqa: C901, CCR001 if datetime.now(timezone.utc) >= datetime.fromisoformat("2022-11-27T09:00:00+00:00"): # Update 14 ETA has passed, so perform the check if ( - this.legacy_galaxy_last_notified is None - or (datetime.now(timezone.utc) - this.legacy_galaxy_last_notified) > timedelta(seconds=300) + ( + this.legacy_galaxy_last_notified is None + or (datetime.now(timezone.utc) - this.legacy_galaxy_last_notified) > timedelta(seconds=300) + ) + and config.get_int('inara_out') and not is_beta and not this.multicrew and credentials(cmdr) ): # LANG: The Inara API only accepts Live galaxy data, not Legacy galaxy data logger.info(_("Inara only accepts Live galaxy data"))