File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -294,16 +294,19 @@ def update_namespace(self) -> None:
294294 """Update the namespace variables with the results from the getters"""
295295 # FIXME: This is a temporary "fix" and does not handle updating output
296296 keys = [k for k in self .shell .user_ns .keys ()]
297- for key in keys :
298- value = self .shell .user_ns [key ]
299- if asyncio .isfuture (value ) and (
300- isinstance (value , FuturePromise ) or isinstance (value , asyncio .Task )
301- ):
302- # Functions that need to return values from asynchronous
303- # network requests return futures. They should all be resolved
304- # now, so use the result.
305- self .shell .user_ns [key ] = value .result ()
306- self .results .clear ()
297+ try :
298+ for key in keys :
299+ value = self .shell .user_ns [key ]
300+ if asyncio .isfuture (value ) and (isinstance (value , FuturePromise ) or isinstance (value , asyncio .Task )):
301+ # Getters/setters return futures
302+ # They should all be resolved now, so use the result
303+ self .shell .user_ns [key ] = value .result ()
304+ self .results .clear ()
305+ except Exception as e :
306+ self .results .clear ()
307+ self .abort_all = True
308+ self .create_task (self ._execute_next_request )
309+ raise e
307310
308311 def _callback (self , * args , ** kwargs ) -> None :
309312 """After each future resolves check to see if they are all resolved. If
You can’t perform that action at this time.
0 commit comments