From a94d9293f3f006b4f209a62a3e20a63a1c63d213 Mon Sep 17 00:00:00 2001 From: ramforth Date: Wed, 29 Oct 2025 12:46:00 +0100 Subject: [PATCH] Fix: Gracefully handle KeyboardInterrupt on exit. --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index d58396f..8d79945 100644 --- a/main.py +++ b/main.py @@ -159,6 +159,8 @@ def main(): else: console.print("[yellow]No new messages or an error occurred. Retrying...[/yellow]") time.sleep(5) # Wait 5 seconds before retrying on error + except KeyboardInterrupt: + pass # Exit gracefully on Ctrl+C finally: log_file.close() save_log = input(f"\nDo you want to save the chat log to {log_filename}? (y/n): ").lower()