feat: handle KeyboardInterrupt with default exception handler

This commit is contained in:
Paul Gauthier (aider) 2024-08-30 15:07:48 -07:00
parent 3b045a2cef
commit 0df97c3241

View file

@ -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