Skip to content

Commit

Permalink
Inara: Drop addCommanderCombatInterdicted if empty opponentName
Browse files Browse the repository at this point in the history
Addresses #1732 specifically.

At some point #1433 needs fully addressing (review all Inara API code for
compliance with docs).
  • Loading branch information
Athanasius committed Dec 1, 2022
1 parent b06e579 commit 2bbda30
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/inara.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,11 @@ def journal_entry( # noqa: C901, CCR001
elif 'Power' in entry:
data['opponentName'] = entry['Power']

new_add_event('addCommanderCombatInterdicted', entry['timestamp'], data)
if data['opponentName'] == "":
logger.warning('Dropping addCommanderCombatInterdicted message because opponentName came out as ""')

else:
new_add_event('addCommanderCombatInterdicted', entry['timestamp'], data)

elif event_name == 'Interdiction':
data = OrderedDict([
Expand Down

0 comments on commit 2bbda30

Please sign in to comment.