[cleanup] fti_* method already try/except exception, no need for additional catch here stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 08 Mar 2010 09:05:17 +0100
branchstable
changeset 4828 3e173d598cad
parent 4827 8a505bf12193
child 4829 3b79a0fc91db
child 4836 3e3c4917e94e
[cleanup] fti_* method already try/except exception, no need for additional catch here
hooks/syncschema.py
--- a/hooks/syncschema.py	Mon Mar 08 09:04:36 2010 +0100
+++ b/hooks/syncschema.py	Mon Mar 08 09:05:17 2010 +0100
@@ -1155,15 +1155,11 @@
                       len(rset), etype)
             still_fti = list(schema[etype].indexable_attributes())
             for entity in rset.entities():
-                try:
-                    source.fti_unindex_entity(session, entity.eid)
-                    for container in entity.fti_containers():
-                        if still_fti or container is not entity:
-                            source.fti_unindex_entity(session, entity.eid)
-                            source.fti_index_entity(session, container)
-                except Exception:
-                    self.critical('Error while updating Full Text Index for'
-                                  ' entity %s', entity.eid, exc_info=True)
+                source.fti_unindex_entity(session, entity.eid)
+                for container in entity.fti_containers():
+                    if still_fti or container is not entity:
+                        source.fti_unindex_entity(session, entity.eid)
+                        source.fti_index_entity(session, container)
         if len(to_reindex):
             # Transaction have already been committed
             session.pool.commit()