Commit be31425e authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Type: Allow access to decimal module.

parent 04f86d23
......@@ -235,3 +235,13 @@ def guarded_import(mname, globals=None, locals=None, fromlist=None,
safe_builtins['__import__'] = guarded_import
ModuleSecurityInfo('transaction').declarePublic('doom')
import decimal
allow_module('decimal')
ContainerAssertions[decimal.Decimal] = 1
ContainerAssertions[decimal.Context] = 1
for member_id in dir(decimal):
member = getattr(decimal, member_id)
if isinstance(member, type) and issubclass(member, decimal.DecimalException):
ContainerAssertions[member] = 1
del member_id, member
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment