1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 07:47:14 +03:00

Inara: Drop addCommanderCombatInterdicted if empty opponentName

Addresses #1732 specifically.

At some point #1433 needs fully addressing (review all Inara API code for
compliance with docs).
This commit is contained in:
Athanasius 2022-12-01 13:33:26 +00:00
parent b06e579754
commit 2bbda30097
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -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([