@@ -260,7 +260,7 @@ def decode(msg):
260260 msg ['content' ] = decode (msg_frames [3 ])
261261 check_sig = self .msg_sign (msg_frames )
262262 if check_sig != m_signature :
263- _LOGGER .debug ( " check_sig=%s, m_signature=%s, wire_msg=%s" , check_sig , m_signature , wire_msg )
263+ _LOGGER .error ( "signature mismatch: check_sig=%s, m_signature=%s, wire_msg=%s" , check_sig , m_signature , wire_msg )
264264 raise ValueError ("Signatures do not match" )
265265
266266 return identities , msg
@@ -355,6 +355,10 @@ async def shell_handler(self, shell_socket, full_msg):
355355 exc = self .ast_ctx .get_exception_obj ()
356356 if exc :
357357 traceback_mesg = self .ast_ctx .get_exception_long ().split ("\n " )
358+
359+ if msg ['content' ].get ("store_history" , True ):
360+ self .execution_count += 1
361+
358362 metadata = {
359363 "dependencies_met" : True ,
360364 "engine" : self .engine_id ,
@@ -374,8 +378,11 @@ async def shell_handler(self, shell_socket, full_msg):
374378 del content ["execution_count" ], content ["status" ]
375379 await self .send (self .iopub_socket , 'error' , content , parent_header = msg ['header' ])
376380
377- if msg ['content' ].get ("store_history" , True ):
378- self .execution_count += 1
381+ content = {
382+ 'execution_state' : "idle" ,
383+ }
384+ await self .send (self .iopub_socket , 'status' , content , parent_header = msg ['header' ])
385+ return
379386
380387 # if True or isinstance(self.ast_ctx.ast, ast.Expr):
381388 _LOGGER .debug ("Executing: '%s' got result %s" , code , result )
0 commit comments