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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
14322ab6
Commit
14322ab6
authored
Oct 03, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop Transaction extension & allow use of transaction.doom from Restricted Python
parent
6f99d9d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
product/ERP5/Extensions/Transaction.py
product/ERP5/Extensions/Transaction.py
+0
-9
product/ERP5Type/patches/Restricted.py
product/ERP5Type/patches/Restricted.py
+2
-0
No files found.
product/ERP5/Extensions/Transaction.py
deleted
100644 → 0
View file @
6f99d9d1
import
transaction
def
abort_transaction
():
# FIXME: aborting a transaction means it could be commited later on. The
# transaction should be doom()ed instead, but transaction.doom() is not
# available on Zope 2.8. We should provide our own doom() implementation
# which raises an exception on pre-commit-hook, which does exist
# in Zope 2.8
transaction
.
abort
()
product/ERP5Type/patches/Restricted.py
View file @
14322ab6
...
@@ -228,3 +228,5 @@ def guarded_import(mname, globals=None, locals=None, fromlist=None,
...
@@ -228,3 +228,5 @@ def guarded_import(mname, globals=None, locals=None, fromlist=None,
fromlist
=
[
'__name__'
]
fromlist
=
[
'__name__'
]
return
orig_guarded_import
(
mname
,
globals
,
locals
,
fromlist
,
level
)
return
orig_guarded_import
(
mname
,
globals
,
locals
,
fromlist
,
level
)
safe_builtins
[
'__import__'
]
=
guarded_import
safe_builtins
[
'__import__'
]
=
guarded_import
ModuleSecurityInfo
(
'transaction'
).
declarePublic
(
'doom'
)
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