If the string assignment didn't work either, give up without failing

This commit is contained in:
Fabio Manganiello 2018-06-14 19:07:33 +02:00
parent 37f952fc41
commit 4d48506cb2
1 changed files with 4 additions and 1 deletions

View File

@ -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()