From 07065b0bf35a9c10e8c290597d1b5aec0a04ef5d Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 4 Jun 2021 17:35:37 +0100 Subject: [PATCH] inara: Comment out generic setCommanderTravelLocation event This interferes with more specific such events, i.e. from Journal `Location` event, if sent in the same batch. --- plugins/inara.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/plugins/inara.py b/plugins/inara.py index 5cd53dd5..a940173f 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -451,15 +451,17 @@ def journal_entry( # noqa: C901, CCR001 # Update location # 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 - ]) - ) + # XXX: This interferes with other more specific setCommanderTravelLocation events in the same + # batch. + # 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 @@ -1511,7 +1513,6 @@ def send_data(url: str, data: Mapping[str, Any]) -> bool: # noqa: CCR001 :param data: the data to POST :return: success state """ - r = this.session.post(url, data=json.dumps(data, separators=(',', ':')), timeout=_TIMEOUT) r.raise_for_status() reply = r.json()