From 74ebaff4e3838978f886d0c728fe5bb0d3ecd9d5 Mon Sep 17 00:00:00 2001 From: Lasse Blaauwbroek Date: Fri, 9 Jun 2023 22:05:05 +0200 Subject: [PATCH] Make older python versions work --- capnp/lib/capnp.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/capnp/lib/capnp.pyx b/capnp/lib/capnp.pyx index 02ba3f4..fa6084e 100644 --- a/capnp/lib/capnp.pyx +++ b/capnp/lib/capnp.pyx @@ -80,7 +80,8 @@ def void_task_done_callback(method_name, _VoidPromiseFulfiller fulfiller, task): exc = task.exception() if exc is not None: - fulfiller.fulfiller.reject(makeException(capnp.StringPtr(''.join(_traceback.format_exception(exc))))) + fulfiller.fulfiller.reject(makeException(capnp.StringPtr(''.join( + _traceback.format_exception(type(exc), exc, exc.__traceback__))))) return res = task.result()