Be a bit more robust with string assignment in procedure context
This commit is contained in:
parent
d9b51c94c0
commit
37f952fc41
1 changed files with 5 additions and 1 deletions
|
@ -214,7 +214,11 @@ class IfProcedure(Procedure):
|
||||||
|
|
||||||
def execute(self, **context):
|
def execute(self, **context):
|
||||||
for (k, v) in context.items():
|
for (k, v) in context.items():
|
||||||
|
try:
|
||||||
exec('{}={}'.format(k, v))
|
exec('{}={}'.format(k, v))
|
||||||
|
except:
|
||||||
|
if isinstance(v, str):
|
||||||
|
exec('{}="{}"'.format(k, re.sub('(^|[^\\\])"', '\1\\"', v)))
|
||||||
|
|
||||||
condition_true = eval(self.condition)
|
condition_true = eval(self.condition)
|
||||||
response = Response()
|
response = Response()
|
||||||
|
|
Loading…
Reference in a new issue