File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -355,13 +355,13 @@ class SyncLayout(Layout):
355
355
def __enter__ (self ):
356
356
self .loop = asyncio .new_event_loop ()
357
357
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
359
360
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 ()
362
363
self .loop .close ()
363
364
self .thread .shutdown ()
364
- return result
365
365
366
366
def sync_render (self ):
367
367
return self .thread .submit (self .loop .run_until_complete , self .render ()).result ()
You can’t perform that action at this time.
0 commit comments