update coretk gui to allow proper cancel when there is an attempt to exit a running session
This commit is contained in:
parent
396a948bb9
commit
9f3a3cef28
1 changed files with 3 additions and 6 deletions
|
@ -48,24 +48,21 @@ class MenuAction:
|
||||||
|
|
||||||
:return: nothing
|
:return: nothing
|
||||||
"""
|
"""
|
||||||
logging.info(
|
|
||||||
"menuaction.py: clean_nodes_links_and_set_configuration() Exiting the program"
|
|
||||||
)
|
|
||||||
try:
|
try:
|
||||||
if not self.app.core.is_runtime():
|
if not self.app.core.is_runtime():
|
||||||
self.app.core.delete_session()
|
self.app.core.delete_session()
|
||||||
if quitapp:
|
if quitapp:
|
||||||
self.app.quit()
|
self.app.quit()
|
||||||
else:
|
else:
|
||||||
result = messagebox.askyesnocancel("stop", "Stop the running session?")
|
result = messagebox.askyesnocancel("Exit", "Stop the running session?")
|
||||||
if result:
|
if result is True:
|
||||||
self.app.statusbar.progress_bar.start(5)
|
self.app.statusbar.progress_bar.start(5)
|
||||||
thread = threading.Thread(
|
thread = threading.Thread(
|
||||||
target=self.cleanup_old_session, args=([quitapp])
|
target=self.cleanup_old_session, args=([quitapp])
|
||||||
)
|
)
|
||||||
thread.daemon = True
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
elif quitapp:
|
elif result is False and quitapp:
|
||||||
self.app.quit()
|
self.app.quit()
|
||||||
except grpc.RpcError:
|
except grpc.RpcError:
|
||||||
logging.exception("error deleting session")
|
logging.exception("error deleting session")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue