mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
[#2146] Cleanup On CtrlC Already Running
This commit is contained in:
parent
840dd54faf
commit
bbd911cfd9
@ -353,7 +353,13 @@ if __name__ == '__main__': # noqa: C901
|
|||||||
button = ttk.Button(frame, text='OK', command=lambda: sys.exit(0))
|
button = ttk.Button(frame, text='OK', command=lambda: sys.exit(0))
|
||||||
button.grid(row=2, column=0, sticky=tk.S)
|
button.grid(row=2, column=0, sticky=tk.S)
|
||||||
|
|
||||||
|
try:
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
logger.info("Ctrl+C Detected, Attempting Clean Shutdown")
|
||||||
|
sys.exit()
|
||||||
|
logger.info('Exiting')
|
||||||
|
|
||||||
|
|
||||||
journal_lock = JournalLock()
|
journal_lock = JournalLock()
|
||||||
locked = journal_lock.obtain_lock()
|
locked = journal_lock.obtain_lock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user