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:
parent
08f1f3e7d9
commit
5175136419
7
plug.py
7
plug.py
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user