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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
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,
fromlist
=
[
'__name__'
]
return
orig_guarded_import
(
mname
,
globals
,
locals
,
fromlist
,
level
)
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