mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-10 14:11:23 +08:00
No need for explicit logs on KeyboardInterrupt
This commit is contained in:
parent
0f3beb3e23
commit
44e36ce892
2 changed files with 6 additions and 1 deletions
|
|
@ -794,7 +794,7 @@ def main():
|
|||
json_error_logging(
|
||||
False, f"Program interrupted by keyboard: {exc}", level="error"
|
||||
)
|
||||
logger.info("Trace:", exc_info=True)
|
||||
logger.debug("Trace:", exc_info=True)
|
||||
# EXIT_CODE 200 = keyboard interrupt
|
||||
sys.exit(200)
|
||||
except Exception as exc:
|
||||
|
|
|
|||
|
|
@ -1281,6 +1281,11 @@ def main_gui(viewer_mode=False):
|
|||
except _tkinter.TclError as exc:
|
||||
logger.critical(f'Tkinter error: "{exc}". Is this a headless server ?')
|
||||
sys.exit(250)
|
||||
except KeyboardInterrupt as exc:
|
||||
logger.error(f"Program interrupted by keyboard: {exc}", level="error")
|
||||
logger.debug("Trace:", exc_info=True)
|
||||
# EXIT_CODE 200 = keyboard interrupt
|
||||
sys.exit(200)
|
||||
except Exception as exc:
|
||||
sg.Popup(_t("config_gui.unknown_error_see_logs") + f": {exc}", keep_on_top=True)
|
||||
logger.critical(f"GUI Execution error {exc}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue