server/session.py
changeset 9463 d62e13eba033
parent 9458 e2dfdd313dfe
child 9466 c3a5f4507f12
equal deleted inserted replaced
9462:375fc1868b11 9463:d62e13eba033
  1162     @_open_only
  1162     @_open_only
  1163     def system_sql(self, sql, args=None, rollback_on_failure=True):
  1163     def system_sql(self, sql, args=None, rollback_on_failure=True):
  1164         """return a sql cursor on the system database"""
  1164         """return a sql cursor on the system database"""
  1165         if sql.split(None, 1)[0].upper() != 'SELECT':
  1165         if sql.split(None, 1)[0].upper() != 'SELECT':
  1166             self.mode = 'write'
  1166             self.mode = 'write'
  1167         source = self.cnxset.source('system')
  1167         source = self.repo.system_source
  1168         try:
  1168         try:
  1169             return source.doexec(self, sql, args, rollback=rollback_on_failure)
  1169             return source.doexec(self, sql, args, rollback=rollback_on_failure)
  1170         except (source.OperationalError, source.InterfaceError):
  1170         except (source.OperationalError, source.InterfaceError):
  1171             if not rollback_on_failure:
  1171             if not rollback_on_failure:
  1172                 raise
  1172                 raise