Skip to content

Commit

Permalink
simplify algo
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelsz-rb committed Apr 16, 2024
1 parent 97c2a32 commit ded614b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rollbar/lib/transforms/shortener.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ def _shorten_other(self, obj):
return self._repr.repr(obj)

def traverse_dict(self, d):
max_size = self._get_max_size(d)
d = self._shorten_mapping(d, max_size)
for k, v in d.items():
if isinstance(v, dict):
max_size = self._get_max_size(v)
Expand All @@ -93,6 +91,8 @@ def _shorten(self, val):
max_size = self._get_max_size(val)

if isinstance(val, dict):
max_size = self._get_max_size(val)
val = self._shorten_mapping(val, max_size)
return self.traverse_dict(val)

if isinstance(val, (string_types, sequence_types)):
Expand Down

0 comments on commit ded614b

Please sign in to comment.