From 31dd418c8051b2c7c1aae1f9a024ae4b80fb2a2e Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Sat, 24 Feb 2024 20:34:30 -0500 Subject: [PATCH] fix: persisted task exc handling (#135) --- a_sync/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_sync/task.py b/a_sync/task.py index b42c1af9..3e851ca4 100644 --- a/a_sync/task.py +++ b/a_sync/task.py @@ -115,7 +115,7 @@ def __persist(task: "asyncio.Task[Any]") -> None: def __prune_persisted_tasks(): for task in tuple(__persisted_tasks): if task.done(): - if e := task.exception() and not isinstance(e, exceptions.PersistedTaskException): + if (e := task.exception()) and not isinstance(e, exceptions.PersistedTaskException): logger.exception(e) raise e __persisted_tasks.discard(task)