server/sources/native.py
changeset 9770 112c884b2d8d
parent 9664 5ef5494b6b0b
parent 9701 46c8d8701240
child 9802 9f815b1f2516
equal deleted inserted replaced
9765:5607ef9ab9f5 9770:112c884b2d8d
   707             cnx = cnx.cnxset.cnx
   707             cnx = cnx.cnxset.cnx
   708             # getattr to get the actual connection if cnx is a CnxLoggingWrapper
   708             # getattr to get the actual connection if cnx is a CnxLoggingWrapper
   709             # instance
   709             # instance
   710             print 'exec', query, args, getattr(cnx, '_cnx', cnx)
   710             print 'exec', query, args, getattr(cnx, '_cnx', cnx)
   711         try:
   711         try:
   712             # str(query) to avoid error if it's an unicode string
   712             # str(query) to avoid error if it's a unicode string
   713             cursor.execute(str(query), args)
   713             cursor.execute(str(query), args)
   714         except Exception as ex:
   714         except Exception as ex:
   715             if self.repo.config.mode != 'test':
   715             if self.repo.config.mode != 'test':
   716                 # during test we get those message when trying to alter sqlite
   716                 # during test we get those message when trying to alter sqlite
   717                 # db schema
   717                 # db schema
   754         """
   754         """
   755         if server.DEBUG & server.DBG_SQL:
   755         if server.DEBUG & server.DBG_SQL:
   756             print 'execmany', query, 'with', len(args), 'arguments'
   756             print 'execmany', query, 'with', len(args), 'arguments'
   757         cursor = cnx.cnxset.cu
   757         cursor = cnx.cnxset.cu
   758         try:
   758         try:
   759             # str(query) to avoid error if it's an unicode string
   759             # str(query) to avoid error if it's a unicode string
   760             cursor.executemany(str(query), args)
   760             cursor.executemany(str(query), args)
   761         except Exception as ex:
   761         except Exception as ex:
   762             if self.repo.config.mode != 'test':
   762             if self.repo.config.mode != 'test':
   763                 # during test we get those message when trying to alter sqlite
   763                 # during test we get those message when trying to alter sqlite
   764                 # db schema
   764                 # db schema