From 4a148971b4fb5dff9ad41e02716e12e556bf41d8 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 3 Dec 2018 22:52:25 +0100 Subject: [PATCH] Allow non-string values to be passed through a request context as well --- platypush/message/request/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platypush/message/request/__init__.py b/platypush/message/request/__init__.py index 04659b36..f09f4adc 100644 --- a/platypush/message/request/__init__.py +++ b/platypush/message/request/__init__.py @@ -126,7 +126,10 @@ class Request(Message): pass parsed_value = '' - while value: + if not isinstance(value, str): + parsed_value = value + + while value and isinstance(value, str): m = re.match('([^\$]*)(\${\s*(.+?)\s*})(.*)', value) if m and not m.group(1).endswith('\\'): prefix = m.group(1); expr = m.group(2);