mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-13 13:52:13 +03:00
plugins/inara: Avoid Tk event_generate() calls during shutdown
# Conflicts: # plugins/inara.py
This commit is contained in:
parent
db48b6eaad
commit
3ed08f0f7e
@ -1315,16 +1315,14 @@ def send_data(url: str, data: Mapping[str, Any]) -> bool:
|
|||||||
'setCommanderTravelLocation'
|
'setCommanderTravelLocation'
|
||||||
):
|
):
|
||||||
this.lastlocation = reply_event.get('eventData', {})
|
this.lastlocation = reply_event.get('eventData', {})
|
||||||
|
# calls update_location in main thread
|
||||||
if not config.shutting_down:
|
if not config.shutting_down:
|
||||||
# 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', {})
|
||||||
|
# calls update_ship in main thread
|
||||||
if not config.shutting_down:
|
if not config.shutting_down:
|
||||||
# calls update_ship in main thread
|
|
||||||
this.system_link.event_generate('<<InaraShip>>', when="tail")
|
this.system_link.event_generate('<<InaraShip>>', when="tail")
|
||||||
|
|
||||||
return True # regardless of errors above, we DID manage to send it, therefore inform our caller as such
|
return True # regardless of errors above, we DID manage to send it, therefore inform our caller as such
|
||||||
|
Loading…
x
Reference in New Issue
Block a user