@@ -260,7 +260,7 @@ def decode(msg):
260
260
msg ['content' ] = decode (msg_frames [3 ])
261
261
check_sig = self .msg_sign (msg_frames )
262
262
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 )
264
264
raise ValueError ("Signatures do not match" )
265
265
266
266
return identities , msg
@@ -355,6 +355,10 @@ async def shell_handler(self, shell_socket, full_msg):
355
355
exc = self .ast_ctx .get_exception_obj ()
356
356
if exc :
357
357
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
+
358
362
metadata = {
359
363
"dependencies_met" : True ,
360
364
"engine" : self .engine_id ,
@@ -374,8 +378,11 @@ async def shell_handler(self, shell_socket, full_msg):
374
378
del content ["execution_count" ], content ["status" ]
375
379
await self .send (self .iopub_socket , 'error' , content , parent_header = msg ['header' ])
376
380
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
379
386
380
387
# if True or isinstance(self.ast_ctx.ast, ast.Expr):
381
388
_LOGGER .debug ("Executing: '%s' got result %s" , code , result )
0 commit comments