From 0df97c3241ec9dbe2078e2aef195f36d7e7f776c Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 30 Aug 2024 15:07:48 -0700 Subject: [PATCH] feat: handle KeyboardInterrupt with default exception handler --- aider/report.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aider/report.py b/aider/report.py index beb4f6beb..c23e9909c 100644 --- a/aider/report.py +++ b/aider/report.py @@ -89,6 +89,10 @@ def report_github_issue(issue_text, title=None): def exception_handler(exc_type, exc_value, exc_traceback): + # If it's a KeyboardInterrupt, just call the default handler + if issubclass(exc_type, KeyboardInterrupt): + return sys.__excepthook__(exc_type, exc_value, exc_traceback) + # We don't want any more exceptions sys.excepthook = None