From e924e465a3f1b15051700cf4ccd102a441628428 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Thu, 12 Dec 2024 04:48:14 -0400 Subject: [PATCH] fix: attribute error on python 3.8 and 3.9 (#473) --- a_sync/_smart.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/a_sync/_smart.pyx b/a_sync/_smart.pyx index ab41a6e7..b2cf6058 100644 --- a/a_sync/_smart.pyx +++ b/a_sync/_smart.pyx @@ -165,8 +165,9 @@ cdef object _get_result(fut: asyncio.Future): cdef str state = fut._state if state == "FINISHED": fut._Future__log_traceback = False - if fut._exception is not None: - raise fut._exception.with_traceback(fut._exception_tb) + exc = fut._exception + if exc is not None: + raise exc.with_traceback(exc.__traceback__) return fut._result if state == "CANCELLED": raise fut._make_cancelled_error()