server/session.py
changeset 7845 2172978be237
parent 7797 a71618a75b53
parent 7815 2a164a9cf81c
child 7970 83075d897943
--- a/server/session.py	Fri Sep 23 09:17:37 2011 +0200
+++ b/server/session.py	Fri Sep 23 14:18:13 2011 +0200
@@ -574,7 +574,7 @@
             return self.DEFAULT_SECURITY
         try:
             return txstore.write_security
-        except:
+        except AttributeError:
             txstore.write_security = self.DEFAULT_SECURITY
             return txstore.write_security
 
@@ -776,7 +776,7 @@
                 self._threaddata.ctx_count += 1
                 try:
                     cnxset.cnxset_set()
-                except:
+                except Exception:
                     self._threaddata.cnxset = None
                     self.repo._free_cnxset(cnxset)
                     raise
@@ -970,7 +970,7 @@
                         operation.handle_event('precommit_event')
                     self.pending_operations[:] = processed
                     self.debug('precommit session %s done', self.id)
-                except:
+                except BaseException:
                     # if error on [pre]commit:
                     #
                     # * set .failed = True on the operation causing the failure
@@ -985,7 +985,7 @@
                     for operation in reversed(processed):
                         try:
                             operation.handle_event('revertprecommit_event')
-                        except:
+                        except BaseException:
                             self.critical('error while reverting precommit',
                                           exc_info=True)
                     # XXX use slice notation since self.pending_operations is a
@@ -1000,7 +1000,7 @@
                     operation.processed = 'postcommit'
                     try:
                         operation.handle_event('postcommit_event')
-                    except:
+                    except BaseException:
                         self.critical('error while postcommit',
                                       exc_info=sys.exc_info())
                 self.debug('postcommit session %s done', self.id)
@@ -1031,7 +1031,7 @@
                     try:
                         operation = self.pending_operations.pop(0)
                         operation.handle_event('rollback_event')
-                    except:
+                    except BaseException:
                         self.critical('rollback error', exc_info=sys.exc_info())
                         continue
                 cnxset.rollback()