server/session.py
changeset 5238 31c12863fd9d
parent 5201 2b4267157f85
parent 5226 2e215efcc3a6
child 5423 e15abfdcce38
equal deleted inserted replaced
5237:10dd0dd78778 5238:31c12863fd9d
   275 
   275 
   276     # resource accessors ######################################################
   276     # resource accessors ######################################################
   277 
   277 
   278     def system_sql(self, sql, args=None, rollback_on_failure=True):
   278     def system_sql(self, sql, args=None, rollback_on_failure=True):
   279         """return a sql cursor on the system database"""
   279         """return a sql cursor on the system database"""
   280         if not sql.split(None, 1)[0].upper() == 'SELECT':
   280         if sql.split(None, 1)[0].upper() != 'SELECT':
   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):