This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/223/

src/openlmi/storage/SettingProvider.py (Diff revision 1)
258
        return eval(value)
You should at least use ast.literal_eval which is much safer.

http://docs.python.org/2/library/ast.html#ast.literal_eval

- Radek


On April 17th, 2013, 1:18 p.m. CEST, Jan Synacek wrote:

Review request for OpenLMI Developers.
By Jan Synacek.

Updated April 17, 2013, 1:18 p.m.

Repository: openlmi-storage

Description

Add string_to_string_array().

Convenient method that takes a python string and converts it to a python array.
It uses eval(), but the values are sanitized before use.

Diffs

  • src/openlmi/storage/SettingProvider.py (40fd13cef373934b1eb8690ed6ea31079d586a6d)

View Diff