mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-20 08:44:07 +03:00
plugins/inara: Avoid Tk event_generate() calls during shutdown
This commit is contained in:
parent
bca0231dfc
commit
111f445cac
@ -1290,11 +1290,15 @@ def send_data(url: str, data: Mapping[str, Any]) -> bool:
|
|||||||
'setCommanderTravelLocation'
|
'setCommanderTravelLocation'
|
||||||
):
|
):
|
||||||
this.lastlocation = reply_event.get('eventData', {})
|
this.lastlocation = reply_event.get('eventData', {})
|
||||||
|
|
||||||
|
if not config.shutting_down():
|
||||||
# calls update_location in main thread
|
# calls update_location in main thread
|
||||||
this.system_link.event_generate('<<InaraLocation>>', when="tail")
|
this.system_link.event_generate('<<InaraLocation>>', when="tail")
|
||||||
|
|
||||||
elif data_event['eventName'] in ['addCommanderShip', 'setCommanderShip']:
|
elif data_event['eventName'] in ['addCommanderShip', 'setCommanderShip']:
|
||||||
this.lastship = reply_event.get('eventData', {})
|
this.lastship = reply_event.get('eventData', {})
|
||||||
|
|
||||||
|
if not config.shutting_down():
|
||||||
# calls update_ship in main thread
|
# calls update_ship in main thread
|
||||||
this.system_link.event_generate('<<InaraShip>>', when="tail")
|
this.system_link.event_generate('<<InaraShip>>', when="tail")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user