Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async def dispatch_shell(self, msg):
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.")
self.log.error("KeyboardInterrupt caught in kernel.")
finally:
try:
self.post_handler_hook()
Expand Down Expand Up @@ -921,12 +921,15 @@ def stop_aborting():

def _send_abort_reply(self, stream, msg, idents):
"""Send a reply to an aborted request"""
self.log.info("Aborting:")
self.log.info("%s", msg)
self.log.info(
f"Aborting {msg['header']['msg_id']}: {msg['header']['msg_type']}"
)
reply_type = msg["header"]["msg_type"].rsplit("_", 1)[0] + "_reply"
status = {"status": "aborted"}
md = {"engine": self.ident}
md = self.init_metadata(msg)
md = self.finish_metadata(msg, md, status)
md.update(status)

self.session.send(
stream, reply_type, metadata=md,
content=status, parent=msg, ident=idents,
Expand Down