[repository] catch Exception instead of everything stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 05 Jul 2011 10:48:40 +0200
branchstable
changeset 7616 8837e4733888
parent 7613 63bac28113a5
child 7621 55b2d0cce69b
[repository] catch Exception instead of everything
server/repository.py
--- a/server/repository.py	Fri Jul 01 20:14:20 2011 +0200
+++ b/server/repository.py	Tue Jul 05 10:48:40 2011 +0200
@@ -742,7 +742,7 @@
                     args[0] = ex.entity
                     ex.args = tuple(args)
                 raise
-            except:
+            except Exception:
                 # FIXME: check error to catch internal errors
                 self.exception('unexpected error while executing %s with %s', rqlstring, args)
                 raise
@@ -1120,7 +1120,7 @@
                 try:
                     session.execute(rql, {'x': eid, 'seid': scleanup},
                                     build_descr=False)
-                except:
+                except Exception:
                     self.exception('error while cascading delete for entity %s '
                                    'from %s. RQL: %s', entity, sourceuri, rql)
         self.system_source.delete_info_multi(session, [entity], sourceuri)
@@ -1150,7 +1150,7 @@
                     rql += ', NOT (Y cw_source S, S eid %(seid)s)'
                 try:
                     session.execute(rql, {'seid': scleanup}, build_descr=False)
-                except:
+                except Exception:
                     self.exception('error while cascading delete for entity %s '
                                    'from %s. RQL: %s', entities, sourceuri, rql)
         self.system_source.delete_info_multi(session, entities, sourceuri)