From 650b6549662502876dd87d910a45a065200375ed Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 15 Nov 2022 13:28:18 +0000 Subject: [PATCH] remove nesting of try --- src/textual/_animator.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/textual/_animator.py b/src/textual/_animator.py index 25c7e6db8..f4d373abc 100644 --- a/src/textual/_animator.py +++ b/src/textual/_animator.py @@ -189,10 +189,9 @@ class Animator: async def stop(self) -> None: """Stop the animator task.""" try: - try: - await self._timer.stop() - except asyncio.CancelledError: - pass + await self._timer.stop() + except asyncio.CancelledError: + pass finally: self._idle_event.set()