Commit 354d9d3c authored by Yoshinori Okuji's avatar Yoshinori Okuji

In zope 2.8, no need to call sync explicitly.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17462 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bdea9606
...@@ -67,11 +67,7 @@ def abortTransactionSynchronously(): ...@@ -67,11 +67,7 @@ def abortTransactionSynchronously():
""" """
try: try:
import transaction import transaction
# Zope 2.8 and later. # Zope 2.8 and later. sync is automatic.
manager_list = transaction.get()._adapters.keys()
for manager in manager_list:
if getattr(manager, 'sync', None) is not None:
manager.sync()
transaction.abort() transaction.abort()
except ImportError: except ImportError:
# Zope 2.7 and earlier. # Zope 2.7 and earlier.
......
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