Skip to content

Commit 81b0f4e

Browse files
committed
Log keyboard interrupt on quit
Import the logging module and emit an informational log when a keyboard interrupt triggers _request_quit inside _maybe_allow_keyboard_interrupt. This adds visibility for debugging application shutdowns without changing existing close behavior.
1 parent 12f3c4b commit 81b0f4e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

dlclivegui/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# dlclivegui/gui/main.py
22
from __future__ import annotations
33

4+
import logging
45
import signal
56
import sys
67

@@ -27,6 +28,7 @@ def _maybe_allow_keyboard_interrupt(app: QApplication) -> None:
2728
"""
2829

2930
def _request_quit() -> None:
31+
logging.info("Keyboard interrupt received, closing application...")
3032
win = getattr(app, "_main_window", None)
3133
if win is not None:
3234
# Trigger your existing closeEvent cleanup (camera stop, threads, timers, etc.)

0 commit comments

Comments
 (0)