From 04ff008800cedb9adf61dda7f640feba4084a7f4 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 5 Mar 2021 18:52:57 +0100 Subject: [PATCH] Context shouldn't be dumped as json in case of exceptions - if some objects are not JSON serializable then we end up with an uncaught exception --- platypush/message/request/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/message/request/__init__.py b/platypush/message/request/__init__.py index 05162bca53..f29e56959c 100644 --- a/platypush/message/request/__init__.py +++ b/platypush/message/request/__init__.py @@ -133,7 +133,7 @@ class Request(Message): exec('{}="{}"'.format(k, re.sub(r'(^|[^\\])"', '\1\\"', v))) except Exception as e: logger.warning('Could not set context variable {}={}'.format(k, v)) - logger.warning('Context: {}'.format(json.dumps(context))) + logger.warning('Context: {}'.format(context)) logger.exception(e) parsed_value = ''