Commit 37d98e0a authored by Vincent Pelletier's avatar Vincent Pelletier

Remove 2 more hasattr.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17438 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d231b45f
......@@ -70,7 +70,7 @@ def abortTransactionSynchronously():
# Zope 2.8 and later.
manager_list = transaction.get()._adapters.keys()
for manager in manager_list:
if hasattr(manager, 'sync'):
if getattr(manager, 'sync', None) is not None:
manager.sync()
transaction.abort()
except ImportError:
......@@ -78,7 +78,7 @@ def abortTransactionSynchronously():
t = get_transaction()
jar_list = t._get_jars(t._objects, 0)
for jar in jar_list:
if hasattr(jar, 'sync'):
if getattr(jar, 'sync', None) is not None:
jar.sync()
t.abort()
......
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