Skip to content

Commit

Permalink
Merge pull request #674 from meeseeksmachine/auto-backport-of-pr-673-…
Browse files Browse the repository at this point in the history
…on-5.5.x

Backport PR #673 on branch 5.5.x (fix keyboard interrupt issue in dispatch_shell)
  • Loading branch information
blink1073 authored May 13, 2021
2 parents 52aec3a + b39e62e commit b773684
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ def dispatch_shell(self, stream, msg):
yield gen.maybe_future(handler(stream, idents, msg))
except Exception:
self.log.error("Exception in message handler:", exc_info=True)
except KeyboardInterrupt:
# Ctrl-c shouldn't crash the kernel here.
self.log.error("KeyboardInterrupt caught in kernel.")
finally:
try:
self.post_handler_hook()
Expand Down

0 comments on commit b773684

Please sign in to comment.