server/session.py
branchstable
changeset 7815 2a164a9cf81c
parent 7782 40a49f4350a5
child 7845 2172978be237
child 7969 d43569aaf5d6
--- a/server/session.py	Tue Sep 20 15:14:04 2011 +0200
+++ b/server/session.py	Wed Sep 21 17:38:00 2011 +0200
@@ -573,7 +573,7 @@
             return self.DEFAULT_SECURITY
         try:
             return txstore.write_security
-        except:
+        except AttributeError:
             txstore.write_security = self.DEFAULT_SECURITY
             return txstore.write_security
 
@@ -775,7 +775,7 @@
                 self._threaddata.ctx_count += 1
                 try:
                     cnxset.cnxset_set()
-                except:
+                except Exception:
                     self._threaddata.cnxset = None
                     self.repo._free_cnxset(cnxset)
                     raise
@@ -969,7 +969,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
@@ -984,7 +984,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
@@ -999,7 +999,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)
@@ -1030,7 +1030,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()