1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

plugins/inara: Don't try to send None-system location

I'm not sure normal use can cause this, but it's an easy obvious check.
This commit is contained in:
Athanasius 2021-05-20 17:34:09 +01:00
parent 2184afba9b
commit 278a78c09a

View File

@ -449,14 +449,17 @@ def journal_entry( # noqa: C901, CCR001
)
# Update location
new_add_event(
'setCommanderTravelLocation',
entry['timestamp'],
OrderedDict([
('starsystemName', system),
('stationName', station), # Can be None
])
)
# Might not be available if this event is a 'StartUp' and we're replaying
# a log.
if system:
new_add_event(
'setCommanderTravelLocation',
entry['timestamp'],
OrderedDict([
('starsystemName', system),
('stationName', station), # Can be None
])
)
# Update ship
if state['ShipID']: # Unknown if started in Fighter or SRV