Commit 793c778e authored by Sebastien Robin's avatar Sebastien Robin

do not use hasattr, use getattr(o,prop,_marker) instead

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13102 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b8ba785f
......@@ -36,6 +36,8 @@ from ZODB.POSException import ConflictError
from zLOG import LOG
_marker = object()
manage_addZSQLCatalogForm=DTMLFile('dtml/addZSQLCatalog',globals())
HOT_REINDEXING_FINISHED_STATE = 'finished'
......@@ -361,7 +363,7 @@ class ZCatalog(Folder, Persistent, Implicit):
connection_id = folder.connection_id
if connection_id in sql_connection_id_dict:
folder.connection_id = sql_connection_id_dict[connection_id]
elif hasattr(aq_base(folder), 'objectValues'):
elif getattr(aq_base(folder), 'objectValues', _marker) is not _marker:
for object in folder.objectValues():
self.changeSQLConnectionIds(object,sql_connection_id_dict)
......
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