Skip to content
Snippets Groups Projects
Commit c2bff2af authored by Antony Lesuisse's avatar Antony Lesuisse
Browse files

[IMP] safe_eval allow math

parent 06a75d0e
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ __all__ = ['test_expr', 'safe_eval', 'const_eval']
# The time module is usually already provided in the safe_eval environment
# but some code, e.g. datetime.datetime.now() (Windows/Python 2.5.2, bug
# lp:703841), does import time.
_ALLOWED_MODULES = ['_strptime', 'time']
_ALLOWED_MODULES = ['_strptime', 'math', 'time']
_UNSAFE_ATTRIBUTES = ['f_builtins', 'f_globals', 'f_locals', 'gi_frame',
'co_code', 'func_globals']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment