File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ def __init__(self, in_background: bool = False):
4141 ]
4242 ]()
4343 self .input_accepted = False
44+ self .errored = False
4445 self .in_background = in_background
4546
4647
@@ -232,6 +233,11 @@ async def _process_message(self, data: dict):
232233 logger .debug (
233234 f"Execution { parent_msg_ig } finished execution with error: { data ['content' ]['ename' ]} : { data ['content' ]['evalue' ]} "
234235 )
236+
237+ if execution .errored :
238+ return
239+
240+ execution .errored = True
235241 await queue .put (
236242 Error (
237243 name = data ["content" ]["ename" ],
@@ -295,6 +301,11 @@ async def _process_message(self, data: dict):
295301 elif data ["msg_type" ] == "execute_reply" :
296302 if data ["content" ]["status" ] == "error" :
297303 logger .debug (f"Execution { parent_msg_ig } finished execution with error" )
304+
305+ if execution .errored :
306+ return
307+
308+ execution .errored = True
298309 await queue .put (
299310 Error (
300311 name = data ["content" ]["ename" ],
You can’t perform that action at this time.
0 commit comments