File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -355,13 +355,13 @@ class SyncLayout(Layout):
355355 def __enter__ (self ):
356356 self .loop = asyncio .new_event_loop ()
357357 self .thread = ThreadPoolExecutor (max_workers = 1 )
358- return self .thread .submit (self .loop .run_until_complete , self .__aenter__ ()).result ()
358+ self .thread .submit (self .loop .run_until_complete , self .__aenter__ ()).result ()
359+ return self
359360
360- def __exit__ (self , * exec ):
361- result = self .thread .submit (self .loop .run_until_complete , self .__aexit__ (* exec )).result ()
361+ def __exit__ (self , exc_type , exc_val , exc_tb ):
362+ self .thread .submit (self .loop .run_until_complete , self .__aexit__ ()).result ()
362363 self .loop .close ()
363364 self .thread .shutdown ()
364- return result
365365
366366 def sync_render (self ):
367367 return self .thread .submit (self .loop .run_until_complete , self .render ()).result ()
You can’t perform that action at this time.
0 commit comments