From aac660fb05d2cd4f483b1dc60e28ead9bd793b6a Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 1 Dec 2022 13:37:56 +0000 Subject: [PATCH] Inara: Also catch empty opponentName for Interdict*ion* --- plugins/inara.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/inara.py b/plugins/inara.py index 5783b692..bb9147ff 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -1091,7 +1091,11 @@ def journal_entry( # noqa: C901, CCR001 elif 'Power' in entry: data['opponentName'] = entry['Power'] - new_add_event('addCommanderCombatInterdiction', entry['timestamp'], data) + if data['opponentName'] == "": + logger.warning('Dropping addCommanderCombatInterdiction message because opponentName came out as ""') + + else: + new_add_event('addCommanderCombatInterdiction', entry['timestamp'], data) elif event_name == 'EscapeInterdiction': new_add_event(