From 66809dd47173d5602ad3608001f1f0994d3a8a94 Mon Sep 17 00:00:00 2001 From: Arman Jasuja Date: Thu, 14 Nov 2024 20:33:12 +0400 Subject: [PATCH] Generic exception catch --- loggingredactor/redacting_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loggingredactor/redacting_filter.py b/loggingredactor/redacting_filter.py index 61e7cdd..a99fe6b 100644 --- a/loggingredactor/redacting_filter.py +++ b/loggingredactor/redacting_filter.py @@ -29,7 +29,7 @@ def filter(self, record): def redact(self, content, key=None): try: content_copy = copy.deepcopy(content) - except TypeError: + except Exception: return content if content_copy: if isinstance(content_copy, dict):