From 4d48506cb29b734c5137086d81864bb45bc43c37 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 14 Jun 2018 19:07:33 +0200 Subject: [PATCH] If the string assignment didn't work either, give up without failing --- platypush/procedure/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platypush/procedure/__init__.py b/platypush/procedure/__init__.py index 8a412747a..2967266a0 100644 --- a/platypush/procedure/__init__.py +++ b/platypush/procedure/__init__.py @@ -218,7 +218,10 @@ class IfProcedure(Procedure): exec('{}={}'.format(k, v)) except: if isinstance(v, str): - exec('{}="{}"'.format(k, re.sub('(^|[^\\\])"', '\1\\"', v))) + try: + exec('{}="{}"'.format(k, re.sub('(^|[^\\\])"', '\1\\"', v))) + except: + pass condition_true = eval(self.condition) response = Response()