From 77bdf3bba33c0f4a03fa6a35200d5479b14d9dc0 Mon Sep 17 00:00:00 2001 From: Timur Safin Date: Mon, 18 Jul 2022 17:24:52 +0400 Subject: [PATCH] Fix walk_trace_chain: change container for seen_exceptions --- rollbar/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rollbar/__init__.py b/rollbar/__init__.py index 2ec18d2c..ed0967a4 100644 --- a/rollbar/__init__.py +++ b/rollbar/__init__.py @@ -791,7 +791,7 @@ def _report_exc_info(exc_info, request, extra_data, payload_data, level=None): def _walk_trace_chain(cls, exc, trace): trace_chain = [_trace_data(cls, exc, trace)] - seen_exceptions = {exc} + seen_exceptions = [exc] while True: exc = getattr(exc, '__cause__', None) or getattr(exc, '__context__', None) @@ -800,7 +800,7 @@ def _walk_trace_chain(cls, exc, trace): trace_chain.append(_trace_data(type(exc), exc, getattr(exc, '__traceback__', None))) if exc in seen_exceptions: break - seen_exceptions.add(exc) + seen_exceptions.append(exc) return trace_chain