mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Always clean up when coming out of the Pilot
This commit is contained in:
@@ -679,11 +679,12 @@ class App(Generic[ReturnType], DOMNode):
|
|||||||
app._set_active()
|
app._set_active()
|
||||||
|
|
||||||
# Context manager returns pilot object to manipulate the app
|
# Context manager returns pilot object to manipulate the app
|
||||||
yield Pilot(app)
|
try:
|
||||||
|
yield Pilot(app)
|
||||||
# Shutdown the app cleanly
|
finally:
|
||||||
await app._shutdown()
|
# Shutdown the app cleanly
|
||||||
await app_task
|
await app._shutdown()
|
||||||
|
await app_task
|
||||||
|
|
||||||
async def run_async(
|
async def run_async(
|
||||||
self,
|
self,
|
||||||
|
|||||||
Reference in New Issue
Block a user