Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
be31425e
Commit
be31425e
authored
Dec 09, 2015
by
Vincent Pelletier
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Type: Allow access to decimal module.
parent
04f86d23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
product/ERP5Type/patches/Restricted.py
product/ERP5Type/patches/Restricted.py
+10
-0
No files found.
product/ERP5Type/patches/Restricted.py
View file @
be31425e
...
@@ -235,3 +235,13 @@ def guarded_import(mname, globals=None, locals=None, fromlist=None,
...
@@ -235,3 +235,13 @@ def guarded_import(mname, globals=None, locals=None, fromlist=None,
safe_builtins
[
'__import__'
]
=
guarded_import
safe_builtins
[
'__import__'
]
=
guarded_import
ModuleSecurityInfo
(
'transaction'
).
declarePublic
(
'doom'
)
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
Jérome Perrin
@jerome
mentioned in commit
63031499
·
Jun 09, 2016
mentioned in commit
63031499
mentioned in commit 63031499b60bba3a4dd4ed03260a59cb875da764
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment