From 5102411cde9b023588a8de1979e2102a042b34b2 Mon Sep 17 00:00:00 2001 From: David Brochart Date: Mon, 22 Apr 2024 18:28:33 +0200 Subject: [PATCH] Raise KeyboardInterrupt when handling SIGINT by default --- ipykernel/kernelapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipykernel/kernelapp.py b/ipykernel/kernelapp.py index 98b08b84..0fdcc56b 100644 --- a/ipykernel/kernelapp.py +++ b/ipykernel/kernelapp.py @@ -543,7 +543,7 @@ def register(signum, file=sys.__stderr__, all_threads=True, chain=False, **kwarg def sigint_handler(self, *args): if self.kernel.shell_is_awaiting: self.kernel.shell_interrupt.put(True) - elif self.kernel.shell_is_blocking: + else: raise KeyboardInterrupt def init_signal(self):