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

plug.py: Avoid Tk event_generate() call from show_error() if in shutdown

This commit is contained in:
Athanasius 2021-01-11 15:49:08 +00:00
parent 08f1f3e7d9
commit 5175136419

View File

@ -366,9 +366,16 @@ def notify_newdata(data, is_beta):
def show_error(err):
"""
Display an error message in the status line of the main window.
Will be NOP during shutdown to avoid Tk hang.
:param err:
.. versionadded:: 2.3.7
"""
if config.shutting_down():
logger.info(f'Called during shutdown: "{str(err)}"')
return
if err and last_error['root']:
last_error['msg'] = str(err)
last_error['root'].event_generate('<<PluginError>>', when="tail")