remove nesting of try

This commit is contained in:
Will McGugan
2022-11-15 13:28:18 +00:00
parent 3c73914086
commit 650b654966

View File

@@ -189,10 +189,9 @@ class Animator:
async def stop(self) -> None: async def stop(self) -> None:
"""Stop the animator task.""" """Stop the animator task."""
try: try:
try: await self._timer.stop()
await self._timer.stop() except asyncio.CancelledError:
except asyncio.CancelledError: pass
pass
finally: finally:
self._idle_event.set() self._idle_event.set()