Fix Python code generator to correctly escape strings

A string that contained escape symbols was not correctly escaped
when generating the Python code for the selection.

This could cause selection operations to fail to compile.
This commit is contained in:
Salvo 'LtWorf' Tomaselli 2016-04-23 15:19:32 +02:00
parent 92990039ac
commit 722b164d56
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
- Changes to make failures in commutative operators commutative too
- Added new optimization to remove useless joins
- Correct optimization over selection and product
- Fix Python code generator to correctly escape strings
2.4
- Improve error reporting

View File

@ -194,7 +194,7 @@ class Node (object):
prop = '{\"%s\"}' % prop.replace(
',', '\",\"').replace(ARROW, '\":\"').replace(' ', '')
else: # Selection
prop = '\"%s\"' % prop
prop = repr(prop)
return '%s.%s(%s)' % (self.child.toPython(), op_functions[self.name], prop)
return self.name