server/session.py
branchstable
changeset 5802 159b6a712d9d
parent 5792 e13aa4786a72
child 5811 e77cea9721e7
child 5813 0b250d72fcfa
equal deleted inserted replaced
5801:355d3945c1f3 5802:159b6a712d9d
   281             self.mode = 'write'
   281             self.mode = 'write'
   282         source = self.pool.source('system')
   282         source = self.pool.source('system')
   283         try:
   283         try:
   284             return source.doexec(self, sql, args, rollback=rollback_on_failure)
   284             return source.doexec(self, sql, args, rollback=rollback_on_failure)
   285         except (source.OperationalError, source.InterfaceError):
   285         except (source.OperationalError, source.InterfaceError):
       
   286             if not rollback_on_failure:
       
   287                 raise
   286             source.warning("trying to reconnect")
   288             source.warning("trying to reconnect")
   287             self.pool.reconnect(source)
   289             self.pool.reconnect(source)
   288             return source.doexec(self, sql, args, rollback=rollback_on_failure)
   290             return source.doexec(self, sql, args, rollback=rollback_on_failure)
   289 
   291 
   290     def set_language(self, language):
   292     def set_language(self, language):