[IMP] safe_eval allow math
This commit is contained in:
parent
06a75d0e95
commit
c2bff2afae
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue