@@ -354,7 +354,7 @@ async def dispatch_shell(self, msg):
354354 self .log .error ("Exception in message handler:" , exc_info = True )
355355 except KeyboardInterrupt :
356356 # Ctrl-c shouldn't crash the kernel here.
357- self .log .error ("KeyboardInterrupt caught in kernel." )
357+ self .log .error ("KeyboardInterrupt caught in kernel." )
358358 finally :
359359 try :
360360 self .post_handler_hook ()
@@ -921,12 +921,15 @@ def stop_aborting():
921921
922922 def _send_abort_reply (self , stream , msg , idents ):
923923 """Send a reply to an aborted request"""
924- self .log .info ("Aborting:" )
925- self .log .info ("%s" , msg )
924+ self .log .info (
925+ f"Aborting { msg ['header' ]['msg_id' ]} : { msg ['header' ]['msg_type' ]} "
926+ )
926927 reply_type = msg ["header" ]["msg_type" ].rsplit ("_" , 1 )[0 ] + "_reply"
927928 status = {"status" : "aborted" }
928- md = {"engine" : self .ident }
929+ md = self .init_metadata (msg )
930+ md = self .finish_metadata (msg , md , status )
929931 md .update (status )
932+
930933 self .session .send (
931934 stream , reply_type , metadata = md ,
932935 content = status , parent = msg , ident = idents ,
0 commit comments