Commits

Sylvain Hellegouarch  committed 1176fa1 Merge

Merged in gumnos/cherrypy/gumnos/use-astliteral_eval-instead-of-astparse_-1383757013292 (pull request #51)

Use ast.literal_eval instead of ast.parse("__temp__ = " + s)

  • Participants
  • Parent commits 1cff648, 51f486d

Comments (0)

Files changed (1)

File cherrypy/lib/reprconf.py

             # e.g. IronPython 1.0.
             return eval(s)
 
-        p = ast.parse("__tempvalue__ = " + s)
-        return p.body[0].value
+        return ast.literal_eval(s)
 
     def build_Subscript(self, o):
         return self.build(o.value)[self.build(o.slice)]